基于本地公钥认证实现ssh免密码登录

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 [email protected]


so easy!!!!

  

你可能感兴趣的:(认证,客户端,密码)