中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

主機間無需密碼基于ssh通信

發布時間:2020-06-30 10:29:02 來源:網絡 閱讀:419 作者:狼蛛鬼王 欄目:安全技術

node1:172.16.58.1

node2:172.16.58.3

node1--> node2


首先在node1生成秘鑰

執行命令ssh-keygen -P ''

詢問保存路徑直接回車默認即可,

后面提示私鑰保存為/root/.ssh/id_rsa

公鑰保存為/root/.ssh/id_rsa.pub

[root@node1 ~]# ssh-keygen -P ''

Generating public/private rsa key pair.

Enter file in which to save the key (/root/.ssh/id_rsa): 

Your identification has been saved in /root/.ssh/id_rsa.

Your public key has been saved in /root/.ssh/id_rsa.pub.

The key fingerprint is:

dc:62:ba:81:ac:dd:d9:93:fa:b4:9b:21:8d:e7:98:8c root@node1.magedu.com

The key's randomart p_w_picpath is:

+--[ RSA 2048]----+

|                 |

|                 |

|                 |

|       . .       |

|        S .      |

|   . . = .       |

|    o = =.       |

|   o + %o+       |

|  . E OoBo       |

+-----------------+

把秘鑰傳給node2主機

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

[root@node1 ~]# ssh-copy-id -i .ssh/id_rsa.pubroot@172.16.58.3

The authenticity of host '172.16.58.3 (172.16.58.3)' can'tbe established.

RSA key fingerprint isdb:f8:11:fa:7d:30:95:44:1b:eb:ea:89:ee:fa:a1:27.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '172.16.58.3' (RSA) to the listof known hosts.

root@172.16.58.3's password:

Now try logging into the machine, with "ssh'root@172.16.58.3'", and check in:

 

  .ssh/authorized_keys

 

to make sure we haven't added extra keys thatyou weren't expecting.

測試是否成功免密碼登陸,沒有提示輸入密碼

ssh 172.16.58.3 'date';date
[root@node1 ~]# ssh 172.16.58.3 'date';date

Wed Dec 31 16:51:41 CST 2014

Wed Dec 31 16:52:42 CST 2014


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

嘉荫县| 德钦县| 滦平县| 灵璧县| 阿城市| 阿尔山市| 乐东| 桂平市| 南平市| 黄龙县| 章丘市| 台北市| 池州市| 合阳县| 大宁县| 蒲江县| 峨边| 鄂伦春自治旗| 黄大仙区| 通山县| 张北县| 福州市| 南华县| 新乐市| 鹤岗市| 乡宁县| 涿州市| 尼勒克县| 沿河| 资阳市| 乐业县| 恩平市| 潢川县| 保定市| 凤冈县| 泰安市| 运城市| 吉木萨尔县| 天全县| 鞍山市| 敦煌市|