Last active
August 23, 2023 11:10
-
-
Save Juul/3265ded190c09093c36e to your computer and use it in GitHub Desktop.
ssh-copy-id but for openwrt / dropbear
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
#!/bin/sh | |
if [ "$#" -ne 1 ]; then | |
echo "Example: ${0} [email protected]" | |
exit 1 | |
fi | |
cat ~/.ssh/id_rsa.pub | ssh ${1} "cat >> /etc/dropbear/authorized_keys && chmod 0600 /etc/dropbear/authorized_keys && chmod 0700 /etc/dropbear" |
How to run this script and which way to put it?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chmod -R go=- /etc/dropbear
Will remove all rights for Group and Others.