Skip to content

Instantly share code, notes, and snippets.

@telphan
Created September 28, 2016 15:31
Show Gist options
  • Save telphan/ca675472a2c72d25ccd1e42c05360b95 to your computer and use it in GitHub Desktop.
Save telphan/ca675472a2c72d25ccd1e42c05360b95 to your computer and use it in GitHub Desktop.
Add public ssh key to a device
# [WARNING] Some of this commands may require root privileges
cd /home/root/.ssh/
chmod a+w authorized_keys
# One can just use copy/paste here. Replace key.public with your public key filename
xclip -i key.public && xclip -o > authorized_keys
chmod a-w authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment