ssh host_key error
luzar722 at gmail.com
Thu Apr 21 00:04:50 UTC 2016
Robison, Dave wrote:
> On 04/20/16 02:47 PM, Ernie Luzar wrote:
>> Hello list
>> Just completed installing 10.3 from scratch to a empty disk.
>> The first time I tried to remotely ssh into host I got these error messages.
>> sshd: error: Could not load host key: /etc/ssh/ssh_host_rsa_key
>> sshd: error: Could not load host key: /etc/ssh/ssh_host_dsa_key
>> sshd: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
>> sshd: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key
>> If I remember correctly these keys were populated on the first boot of a newly installed system. Does ssh have some job to populate those keys that I can manually run?
>> Thanks list
>> freebsd-questions at freebsd.org mailing list
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freebsd.org_mailman_listinfo_freebsd-2Dquestions&d=BQICAg&c=3BfiSO86x5iKjpl2b39jud9R1NrKYqPq2js90dwBswk&r=xejns4hCLY4pkxk_Fns5Pg&m=x3sBbIAx3C0zb9JpbibPIYCIeUHW69zI56o-wr_NRhc&s=D7ypGz0vlaZn39U0V1XHQE68lHYmrDi4YTyQOuQOwzU&e= To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> edit /etc/ssh/sshd_config to reflect which key you want to use. I use rsa.
> # HostKey for protocol version 1
> #HostKey /etc/ssh/ssh_host_key
> # HostKeys for protocol version 2
> HostKey /etc/ssh/ssh_host_rsa_key
> #HostKey /etc/ssh/ssh_host_dsa_key
> #HostKey /etc/ssh/ssh_host_ecdsa_key
> #HostKey /etc/ssh/ssh_host_ed25519_key
> Then do, as root:
> ssh-keygen -t rsa -b 4096
> I used 4096 because I am paranoid.
> service sshd restart
> should work
The ssh-keygen command is the hint I needed.
Used ssh-keygen -A
which builds all the host keys by default.
That fixed the problem.
More information about the freebsd-questions