1.生成公私钥 [root@112 ~]# ssh-keygen 一直敲回车就行了 2.发送公钥到需要免密的机器 [root@112 ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.6.110 [root@112 ~]# ssh 192.168.6.110