Skip to content

Instantly share code, notes, and snippets.

@lschatzkin
Last active March 8, 2017 23:53
Show Gist options
  • Save lschatzkin/6285618 to your computer and use it in GitHub Desktop.
Save lschatzkin/6285618 to your computer and use it in GitHub Desktop.
generate ssh key via command line
ps -e | grep [s]sh-agent // see if agent is running
ssh-agent // see if agent is running
ssh-add -l // list keys
ssh-keygen -t dsa -f ~/.ssh/id_dsa -C "yourname@gmail.com" // add key id_dsa ***MAKE A NOTE OF THE PASSCODE!***
ssh-add ~/.ssh/id_dsa // add keys to agent
ssh-add ~/.ssh/id_dsa.pub
ssh -T git@bitbucket.org -v // check to see if connection to Bitbucket is working
// If ssh-add returns "Could not open a connection to your authentication agent." error.
exec ssh-agent bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment