ssh免秘钥登入、双机互信

首先2台服务器可以ssh root@ip 可以相互切换

ssh-keygen -t rsa -C 350161751@qq.com

一路回车

ll /root/.ssh/

-rw------- 1 root root 1679 9月   8 22:54 id_rsa

-rw-r--r-- 1 root root  395 9月   8 22:54 id_rsa.pub   把这个发给对方服务器

发给对方服务器

ssh-copy-id -i /root/.ssh/id_rsa.pub root@172.16.1.7

然后  ssh root@172.16.1.7 不需要密码就可以ssh切过去了

 

友情链接:http://blog.51cto.com/oldboy

友情链接:https://www.xuliangwei.com/

posted @ 2018-09-27 11:16  随口说linux  阅读(449)  评论(0编辑  收藏  举报