歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> BT5-R3開啟SSH服務

BT5-R3開啟SSH服務

日期:2017/2/28 14:46:38   编辑:Linux教程

背景:新裝的BT5-R3系統(192.168.100.141),需要開啟SSH服務。

1,在192.168.100.141上直接運行命令:service ssh start,顯示服務開啟。

執行SSH命令:ssh [email protected],提示:Read from socket failed: Connection reset by peer。

2,在192.168.100.141上查看日志:/var/log/auth.log。看到兩行錯誤信息:

May 23 09:52:55 bt sshd[1726]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key

May 23 09:52:55 bt sshd[1726]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key

3,在192.168.100.141上執行命令:

ssh-keygen -t rsa -f /etc/ssh/ssh_host_ras_key

ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key

(每次執行命令會提示需要輸入,直接回車)

然後在遠程電腦上執行命令:ssh [email protected]

輸入密碼後連接成功。

相關閱讀:VMware虛擬機下安裝BackTrack5(BT5)+漢化教程 http://www.linuxidc.com/Linux/2012-12/76515.htm

Copyright © Linux教程網 All Rights Reserved