=================================================================
Issue
Error while connecting through SSH (Putty or Winscp), following errors can be seen in /var/log/messages:
Raw
Sep 15 16:25:40 hostname sshd[17397]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Sep 15 16:25:40 hostname sshd[17397]: error: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
Sep 15 16:25:40 hostname sshd[17397]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Sep 15 16:25:40 hostname sshd[17397]: error: Permissions 0777 for '/etc/ssh/ssh_host_dsa_key' are too open.
Sep 15 16:25:40 hostname sshd[17397]: error: It is recommended that your private key files are NOT accessible by others.
Sep 15 16:25:40 hostname sshd[17397]: error: This private key will be ignored.
Sep 15 16:25:40 hostname sshd[17397]: error: bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key
Sep 15 16:25:40 hostname sshd[17397]: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
Sep 15 16:25:40 hostname sshd[17397]: Disabling protocol version 2. Could not load host key
Sep 15 16:25:40 hostname sshd[17397]: sshd: no hostkeys available -- exiting.
Raw
Aug 7 08:02:15 hostname sshd[30600]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Aug 7 08:02:15 hostname sshd[30600]: error: @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
Aug 7 08:02:15 hostname sshd[30600]: error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Aug 7 08:02:15 hostname sshd[30600]: error: Permissions 0711 for '/etc/ssh/ssh_host_rsa_key' are too open.
Aug 7 08:02:15 hostname sshd[30600]: error: It is recommended that your private key files are NOT accessible by others.
Aug 7 08:02:15 hostname sshd[30600]: error: This private key will be ignored.
Aug 7 08:02:15 hostname sshd[30600]: error: bad permissions: ignore key: /etc/ssh/ssh_host_rsa_key
Aug 7 08:02:16 hostname sshd[30600]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key
Aug 7 08:02:16 hostname sshd[30600]: Disabling protocol version 1. Could not load host key
=============================================================================================================================
Resolution
1. Move the following files in /etc/ssh to another place, e.g. /root:
Raw
# cd /etc/ssh
# mv ssh_host_dsa_key ssh_host_dsa_key.pub ssh_host_key ssh_host_key.pub ssh_host_rsa_key ssh_host_rsa_key.pub /root
2. Restart the sshd service.
Raw
# service sshd restart
The sshd daemon will recreate new ssh rsa,dsa,rsa1 keys.
0 coment�rios:
Note: only a member of this blog may post a comment.