Created
May 1, 2018 17:29
-
-
Save ianblenke/cd4e0bc24cad3e1585ed401ff80ea022 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/system/xbin/bash | |
cd /data/ssh | |
cat <<EOF > sshd_config | |
AuthorizedKeysFile /data/ssh/authorized_keys | |
ChallengeResponseAuthentication no | |
PasswordAuthentication no | |
PermitRootLogin yes | |
Subsystem sftp internal-sftp | |
pidfile /data/ssh/sshd.pid | |
EOF | |
if [ ! -d authorized_keys ]; then | |
curl https://github.com/ianblenke.keys > authorized_keys | |
fi | |
ssh-keygen -A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment