步骤: 1 ssh-keygen -t rsa 2 cd .ssh 3 ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.50.109 -p 50122 4 ssh -p 50122 root@192.168.10.109已不需要登录密码