Skip to content

Instantly share code, notes, and snippets.

@girishrau
Created January 8, 2021 14:26
Show Gist options
  • Save girishrau/86db8cb7263936a73299f1c59b87ea0b to your computer and use it in GitHub Desktop.
Save girishrau/86db8cb7263936a73299f1c59b87ea0b to your computer and use it in GitHub Desktop.
[ssh] SSH commands #ssh #keys

Generate an RSA key pair

$ ssh-keygen -t rsa -b 2048 -C "email@example.com"

Output the public key in the PEM format

$ ssh-keygen -f ~/.ssh/id_rsa.pub -m PEM -e

Get the fingerprint of the public key

$ ssh-keygen -lf ~/.ssh/id_rsa.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment