Skip to content

Instantly share code, notes, and snippets.

@yratof
Created August 16, 2016 07:17
Show Gist options
  • Save yratof/c5c983b981e52cc9d5ae50dc35e904b2 to your computer and use it in GitHub Desktop.
Save yratof/c5c983b981e52cc9d5ae50dc35e904b2 to your computer and use it in GitHub Desktop.
Adding your ssh key to a server
cat ~/.ssh/id_rsa.pub
# Copy key
nano ~/.ssh/authorized_keys
# ctrlx, y
# Or you can paste this:
cat ~/.ssh/id_rsa.pub | ssh user@server "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment