ubuntu10 192.168.199.137
ubuntu11 192.168.199.138
1.
user10@ubuntu10:~$ ssh-keygen -t rsa
2.
ssh-copy-id user11@192.168.199.138
一直回车确定即可.
3.
ssh user11@192.168.199.138
4.
sudo nano /etc/hosts
末尾追加:
192.168.199.138 ubuntu11
note: /etc/hostname 可以修改主机名