参考:http://blog.yening.cn/2006/10/30/187.html
1. ~
ssh-keygen -t rsa之后三次提示输入,直接回车
之后会在~/.ssh/目录生成id_rsa id_rsa.pub
2.
scp ~/.ssh/id_rsa.pub root@192.168.1.23:/root/
ssh root@192.168.1.23
cat /root/id_rsa.pub >> /root/.ssh/authorized_keys
重启ssh:/etc/init.d/ssh restart
exit
3. 重新ssh root@192.168.1.23,就直接登录了,无需密码。