Skip to content

Instantly share code, notes, and snippets.

@denji
Last active December 28, 2022 13:28
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save denji/231a7cc47ae26afdd852 to your computer and use it in GitHub Desktop.
Save denji/231a7cc47ae26afdd852 to your computer and use it in GitHub Desktop.
Could not load host key: /etc/ssh/ssh_host_ed25519_key

Generate keys for system SSH deamon

System openssh

Generate all key types:

/etc/rc.d/sshd keygen
# or ssh-keygen
/usr/bin/ssh-keygen -A -N ''

Generate only ed25519 key:

/usr/bin/ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ''

Restart SSH deamon:

/etc/rc.d/sshd restart

Port: openssh/openssh-portable

Generate all key types:

/usr/local/etc/rc.d/openssh keygen
# or ssh-keygen
/usr/local/bin/ssh-keygen -A -N ''

Generate only ed25519 key:

/usr/local/bin/ssh-keygen -t ed25519 -f /usr/local/etc/ssh/ssh_host_ed25519_key -N ''

Restart SSH deamon:

/usr/local/etc/rc.d/openssh restart
Copy link

ghost commented Mar 30, 2015

Generate the missing key's with ssh-keygen -A

Is a new key in openssh server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment