Skip to content

Instantly share code, notes, and snippets.

@SebKay
Last active September 18, 2019 09:39
Show Gist options
  • Save SebKay/049db3b44757274924200f4c2137d074 to your computer and use it in GitHub Desktop.
Save SebKay/049db3b44757274924200f4c2137d074 to your computer and use it in GitHub Desktop.
Add SSH key on Ubuntu
# Add to default keys
echo -e '[SSH_KEY]\n' >> ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys
# Add to specific user
echo -e '[SSH_KEY]\n' >> /home/[USER]/.ssh/authorized_keys
chmod 0600 /home/[USER]/.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment