Error message "WARNING: UNPROTECTED PRIVATE KEY FILE!" was printed while connecting through SSH.

Solution Unverified - Updated -

Issue

  • Error while connecting through SSH (Putty or Winscp), following errors can be seen in /var/log/messages:
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.
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 

Environment

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • openssh-server installed

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.