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!!!!