1

Ubuntu 18.04 In system journal I see these error messages appear every 1 to 5 minutes.

error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
error: Could not load host key: /etc/ssh/ssh_host_ed25519_key

See screenshot

These lines are commented in sshd_config:

#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

I connect via SSH without entering password using rsa key with no problems

What are these error messages about then and how to fix it?

1 Answer 1

1

The commented lines in sshd_config are the default values (in other words the behavior doesn't change if you uncomment them). So your sshd is actually looking for the ECDSA and Ed25519 keys (RSA is now considered "weak" and no longer the default encryption).

AFAIK these keys are automatically generated when you install the SSH server but you can (re-)create them with:

ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t ed25519
ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .