1、涉及到的两个命令:
(1) 在客户端生成密钥对儿
ssh -t rsa [-P ''] [-f "~/.ssh/id_rsa"]
(2) 把公钥传输至远程服务器对应用户的家目录
ssh-copy-id [-i [identity_file]] [user@]machine
2、实验过程:
[root@localhost /]#ssh-keygen -t rsa
[root@localhost /]#ssh-copy-id /root/.ssh/id_rsa.pub root@199.100.77.135
so easy!!!!
本文出自 “好好学习,天天向上” 博客,请务必保留此出处http://wangzenghui.blog.51cto.com/9702487/1695394