Skip to content

Instantly share code, notes, and snippets.

@xeoncross
Created September 14, 2010 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xeoncross/579356 to your computer and use it in GitHub Desktop.
Save xeoncross/579356 to your computer and use it in GitHub Desktop.
Creating/Adding SSH key
## add your public key to a new server
ssh-copy-id -i ~/.ssh/id_rsa.pub USERNAME@exammple.com
# new key
scp ~/.ssh/id_rsa.pub user@hostname:~/.ssh/authorized_keys
ssh user@hostname
cd .ssh
chmod 600 authorized_keys
# adding a key
cd ~/.ssh
scp id_rsa.pub user@hostname:~/.ssh
ssh user@hostname
cd .ssh
cat id_rsa.pub >> authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment