{{tag>ssh sshkeygen key create generate rsa ed25519 howto}} ====== Generate SSH Key ====== * https://medium.com/risan/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54 * https://www.mittwald.de/blog/mittwald/howtos/ssh-key-erstellen * https://www.ssh.com/ssh/keygen/ * https://linux.die.net/man/1/ssh-keygen How to create a SSH key. ===== Ed25519 ===== TMPDATE="$( printf '%(%Y%m%d-%H%M%S)T\n' -1 )"; ssh-keygen -a 100 -t ed25519 -f "${HOME}/.ssh/id_ed25519-${USER}-${HOSTNAME:-$(hostname)}-${TMPDATE}" -C "$USER@${HOSTNAME:-$(hostname)}-${TMPDATE}"; ===== RSA ===== ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -C "$USER@${HOSTNAME:-$(hostname)}" ---- ~~DISCUSSION~~