Skip to content

Instantly share code, notes, and snippets.

@craigmulligan
Forked from telphan/access.sh
Created September 28, 2016 15:35
Show Gist options
  • Save craigmulligan/987c8f94d28d570cc6e39aefbe72c33e to your computer and use it in GitHub Desktop.
Save craigmulligan/987c8f94d28d570cc6e39aefbe72c33e 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
@craigmulligan
Copy link
Author

Then to ssh into the device run:
ssh -A -p 22222 root@<device_ip>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment