Unable to start sshd daemon "no hostkeys available"
Issue
-
Error while connecting through SSH (Putty or Winscp), following errors can be seen in /var/log/messages:
Feb 23 21:43:54 node1.example.com sshd: It is required that your private key files are NOT accessible by others. Feb 23 21:43:54 node1.example.com sshd: This private key will be ignored. Feb 23 21:43:54 node1.example.com sshd: key_load_private: bad permissions Feb 23 21:43:54 node1.example.com sshd: Could not load host key: /etc/ssh/ssh_host_ed25519_key Feb 23 21:43:54 node1.example.com sshd: sshd: no hostkeys available -- exiting.
-
sshd daemon fails to start/restart and reports as
sshd: no hostkeys available -- exiting
.
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.