Cocould not load host key:/etc/ssh/ssh_host_rsa_key cannot start SSH Solution

Source: Internet
Author: User

 

 

 

 

 


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.

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.