SSH 服务器不用密码

1 A: user a<br>ssh-keygen -t rsa

 

2 Created a directory on B, if ~/.ssh exists, which is fine.<br>a@A:~> ssh b@B mkdir -p .ssh

 

3 Append this to user b on B ~/.ssh/authorized_keys path.<br>a@A:~> cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'

 

4 a@A:~> ssh b@B hostname

 PS: may be you need these

  • Put the public key in .ssh/authorized_keys2
  • Change the permissions of .ssh to 700
  • Change the permissions of .ssh/authorized_keys2 to 640

posted on   小浪鼓  阅读(291)  评论(0)    收藏  举报

< 2025年4月 >
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
4 5 6 7 8 9 10

导航

统计

点击右上角即可分享
微信分享提示