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