1. Install SSH
2. Create two users. user1 at liunx1 and user2 at linux2.
3. On linux1, login as user1. do
ssh-keygen -P "" -t rsa
4. Copy key file to linux2
scp /home/user1/.ssh/id_rsa.pub user2@linux2:/home/user2/.ssh/authorized_keys
5. Change file permission on linux2
chmod 600 /home/user2/.ssh/authorized_keys
6. test ssh linux2
On linux1, login as user1. do
ssh user2@linux2
这时候将不会提示你输入密码了。
复制代码