Skip to content

Instantly share code, notes, and snippets.

@ziplex
Forked from denji/ssh-ed25519-freebsd.md
Created October 25, 2022 13:05
Show Gist options
  • Select an option

  • Save ziplex/c251174212c3e367e2beac09f2323152 to your computer and use it in GitHub Desktop.

Select an option

Save ziplex/c251174212c3e367e2beac09f2323152 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment