Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1505255
  • 博文数量: 108
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 997
  • 用 户 组: 普通用户
  • 注册时间: 2013-06-29 09:58
个人简介

兴趣是坚持一件事永不衰竭的动力

文章分类

全部博文(108)

文章存档

2021年(1)

2020年(10)

2019年(19)

2018年(9)

2016年(23)

2015年(43)

2013年(3)

我的朋友

分类: 嵌入式

2015-03-31 23:25:45

问题1
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.
解决办法:
ssh-keygen -t rsa -f /etc/ssh/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key  -N ""
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key  -N ""
ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key  -N ""
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key  -N ""


问题2
WARNING: Your password has expired. You must change your password now and login again!
# cat /etc/shadow
root:$1$m.jegaqA$vA.rBTVryyUAcRvyZ2gOL1:0:0:99999:7:::
telnetd:$1$N4uZUEcU$yotoDExxgGXs6PE7PQuIR1:0:0:99999:7:::
honey:$1$SwtHyL/h$MsEX6Vnqz/qhwDsivDqD20:0:0:99999:7:::
sshd:$1$elylgRon$FOHgkwpPMcNI5s.iL8ZS/.:0:0:99999:7:::
这样的话,使用SSH登录就会出现用户登录失败,提示诸如“WARNING: Your password has expired. You must change your password now and login again!”等等。
需要手工修改,大致如下: 
# cat /etc/shadow
root:$1$m.jegaqA$vA.rBTVryyUAcRvyZ2gOL1:15695:5:99999:7:5:20000:
telnetd:$1$N4uZUEcU$yotoDExxgGXs6PE7PQuIR1:15695:5:99999:7:5:20000:
honey:$1$SwtHyL/h$MsEX6Vnqz/qhwDsivDqD20:15695:5:99999:7:5:20000:
sshd:$1$elylgRon$FOHgkwpPMcNI5s.iL8ZS/.:15695:5:99999:7:5:20000:

阅读(10274) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~