SSH

Copy SSH Key to Clipboard

pbcopy < ~/.ssh/id_rsa.pub

List existing SSH keys

ls -al ~/.ssh
# Lists the files in your .ssh directory, if they exist

Generating a new SSH key

ssh-keygen -t rsa -b 4096 -C "[email protected]"
# Creates a new ssh key, using the provided email as a label

Adding a new SSH key to the ssh-agent

Ensure ssh-agent is enabled; start the ssh-agent in the background.

eval "$(ssh-agent -s)"
Agent pid 59566

Add your SSH key to the ssh-agent:

ssh-add ~/.ssh/id_rsa

  • There is no max bit-size defined by the protocol, but server's may kick you if you take too long

    • 2048 used to be safe, now is not
    • 4096 is the best-practice

References

results matching ""

    No results matching ""