在远程桌面链接时,需要输入如图[root@localhost ~]# ssh root@192.168.229.128,这时容易产生忘记IP地址,就需要设置一个别名来代替IP地址。如下:
步骤:
1.使用vim编辑、/etc/下的/hosts/文件。如: [root@localhost ~]# vim /etc/hosts
2.设置别名 192.168.229.128 up14 保存。
3.验证别名是否设置成功 ssh root@up14 如下:ssh linux@up14
The authenticity of host 'up14 (192.168.229.128)' can't be established.
RSA key fingerprint is 46:6a:21:6c:4f:75:26:d9:9f:04:13:5e:4a:70:1d:07.
Are you sure you want to continue connecting (yes/no)? yes
4.完成验证