Skip to content

Instantly share code, notes, and snippets.

@ianblenke
Created May 1, 2018 17:29
Show Gist options
  • Save ianblenke/cd4e0bc24cad3e1585ed401ff80ea022 to your computer and use it in GitHub Desktop.
Save ianblenke/cd4e0bc24cad3e1585ed401ff80ea022 to your computer and use it in GitHub Desktop.
#!/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