Cocould not load host key:/etc/ssh/ssh_host_rsa_key
Unable to start
SSH
A solution
Symptom
:
#/Usr/sbin/sshd
System prompt
"Cocould not load host key:/etc/ssh/ssh_host_key
Cocould not load host key:/etc/ssh/ssh_host_rsa_key
Cocould not load host key:/etc/ssh/ssh_host_dsa_key
Disabling Protocol Version 1. cocould not load host key
Disabling Protocol version 2. cocould not load host key
Sshd: No hostkeys available-exiting"
The general meaning is that
Key
Or something.
The solution is as follows:
:
# 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:
XX: XX root@localhost.localdomain
# Ssh-keygen-t rsa-F/etc/ssh/ssh_host_rsa_key
Generating public/private rkey pair.
Enter passphrase (empty for no passphrase ):
Enter same passphrase again:
Your identification has been saved in/etc/ssh/ssh_host_rsa_key.
Your public key has been saved in/etc/ssh/ssh_host_dsa_rey.pub.
Root@localhost.localdomain
#/Usr/sbin/sshd
At this time, you can
Windows
Use below
Putty
Connect to this
Linux
Host.