Skip to content

Instantly share code, notes, and snippets.



Last active Oct 2, 2019
What would you like to do?
Generate SSH keys
ls -al ~/.ssh # Lists existing files in your .ssh directory
ssh-keygen -t rsa -b 4096 -C "" # Creates new ssh key, using the provided email as label
eval "$(ssh-agent -s)" # Ensure ssh-agent is enabled
ssh-add ~/.ssh/id_rsa # Add ssh key to the ssh-agent

This comment has been minimized.

Copy link

@ghost ghost commented Aug 6, 2016

Hi, I find this command also very helpful: pbcopy < ~/.ssh/
It lets you add your generated key to the clipboard, if you like to paste it in somewhere quick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment