来源:沧海无痕

昨天down下来的backtrack 5的iso,装上之后发现不能远程登录,ssh服务启动报错:

root@bt:~# /etc/init.d/ssh restart
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
* Restarting OpenBSD Secure Shell server sshd

Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key

 

依稀记得很早以前的bt版本也是这样的 想不通官方为啥要搞这么个

解决方法是:

#sshd-generate

密码设置空

或者

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

密码那里直接敲回车设置为空

#ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key

密码那里直接敲回车设置为空

root@bt:~# /etc/init.d/ssh restart
* Restarting OpenBSD Secure Shell server sshd                           [ OK ]

 

这样就OK了~~