FreeBSD Could not load host key:/etc/ssh/ssh_host_dsa_key

Source: Internet
Author: User
Tags ssh server

When I just loaded FreeBSD. Login with putty, could not load host key:/etc/ssh/ssh_host_dsa_key

This is because SSH server is not turned on.

To open SSH:

Workaround:/etc/rc.conf Join

Sshd_enable= "YES"

Start sshd

/etc/rc.d/sshd start

Attached:Some problems with FreeBSD ssh (GO)

Remember to restart the SSHD server (/etc/rc.d/sshd restart) after modifying the configuration file.
Some additional Notes
1, if not after reboot, please reload the Sshd_config file
/etc/rc.d/sshd Reload
2 If a using keyboard-interactive authentication appears
Password
Please confirm if Passwordauthentication has been changed to Yes
In addition, if the client is Putty then please confirm "Try ' Smart Keyboard ' authentication (SSH-2)" Check if there is a remove
3, if you are logged in with the root account
Please confirm that the password is empty
Blank password cannot be logged in
4 Make sure you have SSH installed
Sysinstall>>>configure>>>networking>>>sshd whether the hook has a hit on the installation freeBSD6.2 Select Development installation
#ee/etc/inetd.conf
Remove the # in front of the sshd
#ee/etc/rc.conf
Add inetd_enable= "YES"
#kill-hup ' Cat/var/run/inetd.pid '

Then use Putty remote login, always end immediately, fail
There's a message from the FreeBSD terminal.
"May 7 21:38:26 FreeBSD sshd[595]: error:could not load
Host key:/etc/ssh/ssh_host_dsa_key "

Idea put on/etc/ssh/ssh_host_dsa_key I don't have this file
More/etc/ssh/sshd_config all items are preceded by #
Try to change some, and restart inetd invalid
Doesn't seem to be the configuration problem for most netizens.
In front of the main want to automatically generate this file, failed

Checked the manual again.
%ssh-keygen-t DSA
All the way to the carriage return, by default a key pair is placed on the ~/.SSH/ID_DSA
#cp ~/.ssh/id_dsa/etc/ssh/ssh_host_dsa_key
Inetd-hup
Try again, OK.

FreeBSD Could not load host key:/etc/ssh/ssh_host_dsa_key

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.