-
-
Save craigmulligan/987c8f94d28d570cc6e39aefbe72c33e to your computer and use it in GitHub Desktop.
Add public ssh key to a device
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# [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
Then to ssh into the device run:
ssh -A -p 22222 root@<device_ip>