[实践OK]树莓派装FreeBSD时出现Could not load host key: /etc/ssh/ssh_host_dsa_key 不指定

jackxiang 2016-2-21 11:06 | |
背景:在Raspberry Pi上装了一个FreeBSD,之前是linux,用ssh连接时出现问题,这个ssh其实linux上也是一样的,于是按linux上的办法解决了该问题,重启动sshd后,用我的手机重新ssh到Raspberry pi上,提示error消失,连接正常。
root@rpi2:/usr/local # Feb 18 03:50:39 rpi2 sshd[4917]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
魅族手机ssh访问:
Feb 18 03:50:41 rpi2 sshd[4917]: error: PAM: authentication error for root from meizu-mx4-pro.lan

Could not load host key: /etc/ssh/ssh_host_dsa_key,那就生成这个key:
root@rpi2:/usr/local # ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
The key fingerprint is:
SHA256:0gV9unsS+HmqgE0j45aqtNQVhVsYNUiX2pgBbbmBLbM root@rpi2
The key's randomart image is:
+---[DSA 1024]----+
|   .*oB=o.       |
|   + @oo... .    |
|    =.@   .o     |
|   E *.o ..      |
|    o.+ S. .     |
|  ...B o. o      |
| o .= o  . +     |
|o .o   .  = o    |
|.o.     ...=     |
+----[SHA256]-----+

重新启动ssh服务:
root@rpi2:/usr/local # /etc/rc.d/sshd restart
Performing sanity check on sshd configuration.
Could not load host key: /etc/ssh/ssh_host_dsa_key
Stopping sshd.
Waiting for PIDS: 799.
Performing sanity check on sshd configuration.
Could not load host key: /etc/ssh/ssh_host_dsa_key
Starting sshd.



参考自:http://blog.163.com/zhengjiu_520/blog/static/3559830620118851822482/

作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:http://jackxiang.com/post/8519/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!


最后编辑: jackxiang 编辑于2016-2-21 11:08
评论列表
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]