首页 > 其他 > 详细

配置ssh无密码访问

时间:2014-10-20 15:17:00      阅读:194      评论:0      收藏:0      [点我收藏+]
  1. 进入一台ubuntu服务器ubuntu1


  2. 2

    ssh-keygen -t rsa #一直回车


  3. 3

    cd .ssh

  4. 4

    cat id_rsa.pub >> authorized_keys


  5. 5

    #将生成的公钥传到ubuntu2机器

    scp id_rsa.pub ubuntu@ubuntu2:/home/ubuntu/opt/id_rsa.pub


  6. 6

    #进入ubuntu2机器

    cd ~

  7. 7

    ssh-keygen -t rsa #一直回车


  8. 8

    cd .ssh


  9. 9

    cat id_rsa.pub >> authorized_keys


  10. 10

    #完成ubuntu1到ubuntu2的无密码访问

    cat /home/ubuntu/opt/id_rsa.pub >>authorized_keys


  11. 11

    #将ubuntu2的公钥传到ubuntu1

    scp id_rsa.pub ubuntu@ubuntu1:/home/ubuntu/opt/id_rsa.pub


  12. 12

    #进入ubuntu1机器

    cd ~/.ssh


  13. 13

    #完成ubuntu2到ubuntu1的无密码访问

    cat /home/ubuntu/opt/id_rsa.pub >>authorized_keys


本文出自 “XFICC” 博客,请务必保留此出处http://xficc.blog.51cto.com/1189288/1565859

配置ssh无密码访问

原文:http://xficc.blog.51cto.com/1189288/1565859

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!