ssh公钥免密码登录

1、在本地生成秘钥对:

ssh-keygen -t rsa

scp /opt/id_rsa.pub root@192.168.71.11:/root/.ssh/authorized_keys

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys    #多个的话

 

posted @ 2017-12-03 14:40  灬魑魅魍魉灬  阅读(193)  评论(0编辑  收藏  举报