Skip to content

Instantly share code, notes, and snippets.

@epreston
Last active June 30, 2021 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epreston/bcce32e6cb2bbd34f013c891e33c2968 to your computer and use it in GitHub Desktop.
Save epreston/bcce32e6cb2bbd34f013c891e33c2968 to your computer and use it in GitHub Desktop.
generate a new 4096 bit SSH key that uses RSA algorithm
# Generate new 4096 bit RSA SSH key:
# --- Only use when ed25519 isnt possible ---
ssh-keygen -o -a 100 -t rsa -b 4096 -f ~/.ssh/id_rsa -C "login@hostname.com"
# -o : Save the private-key using the new OpenSSH format rather than the PEM format
# -a: Increase resistance to brute-force password cracking if the private-key is stolen.
# -t: Type of key to create (rsa).
# -f: Filename of the generated key file.
# -C: Optional comment, often <login>@<hostname> or email.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment