分享

利用ssh-keygen生成密钥对

 芥纳须弥 2014-10-29

Do you want to login other's host without input password?To do as following steps: (Linux to Linux)

First: 
[root@host127 ~]# ssh-keygen -t rsa 
this command will generating public/private rsa key pair. 
Your identification has been saved in /root/.ssh/id_rsa
Your public key has been saved in /root/.ssh/id_rsa.pub


second:
[root@host127 ~]# scp /root/.ssh/id_rsa.pub root@192.168.10.184:/root 
[root@host127 ~]# ssh 192.168.10.184 
[root@abc ~]# cat /root/id_rsa.pub >> /root/.ssh/authorized_keys 

ok,you will login 192.168.10.184 without input password.

If you want to login remote linux server with putty work in your local windows, you could do as: (Window to Linux)

1)First, use ssh-kengen to creat public/private rsa key pair.
2)Then, [root@localhost .ssh]# cat id_rsa.pub > authorized_keys

3)Download the private key with winSCP, and then use puttygen to convert the private key to the format which linux could accept.

4)Set putty, and load the new pricate key.

Now, you could loing remote linux server without input password.


    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多