ssh-keygen Command Examples

Generate SSH keys used for authentication, password-less logins, and other things. More information: https://man.openbsd.org/ssh-keygen.

ssh-keygen

ssh-keygen -t {{ed25519}} -a {{32}} -f {{~/.ssh/filename}}

ssh-keygen -t {{rsa}} -b {{4096}} -C "{{comment|email}}"

ssh-keygen -R {{remote_host}}

ssh-keygen -l -E {{md5}} -f {{~/.ssh/filename}}

ssh-keygen -p -f {{~/.ssh/filename}}

ssh-keygen -p -N "" -m {{PEM}} -f {{~/.ssh/OpenSSH_private_key}}

ssh-keygen -y -f {{~/.ssh/OpenSSH_private_key}}