歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> linux ssh無密碼登錄

linux ssh無密碼登錄

日期:2017/3/2 9:59:26   编辑:關於Linux

1、架構
192.168.0.5 登錄機。
192.168.0.10 被登錄機。
2、執行步驟
(1)在192.168.0.5上執行
#ssh-keygen -t rsa 一路回車
在~/.ssh/目錄下生一對公鑰和私鑰id_rsa id_rsa.pub
(2)把公鑰id_rsa.pub拷貝到遠程登錄機上
#ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
輸入密碼
10
Now try logging into the machine, with "ssh '[email protected]", and check in:

.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.
成功!

Copyright © Linux教程網 All Rights Reserved