cheat/cheat/cheatsheets/ssh-keygen

21 lines
638 B
Plaintext

# To generate an SSH key:
ssh-keygen -t rsa
# To generate a 4096-bit SSH key:
ssh-keygen -t rsa -b 4096
# To update a passphrase on a key
ssh-keygen -p -P old_passphrase -N new_passphrase -f /path/to/keyfile
# To remove a passphrase on a key
ssh-keygen -p -P old_passphrase -N '' -f /path/to/keyfile
# To generate a 4096 bit RSA key with a passphase and comment containing the user and hostname
ssh-keygen -t rsa -b 4096 -C "$USER@$HOSTNAME" -P passphrase
# To print the fingerprint of a public key
ssh-keygen -lf /path/to/keyfile
# To print the Github-style (MD5) fingerprint of a public key
ssh-keygen -E md5 -lf /path/to/keyfile