Skip to content

Instantly share code, notes, and snippets.

@tienthanh2509
Created August 12, 2023 16:22
Show Gist options
  • Save tienthanh2509/9568cd0dfc4ef5156f0234df50def8f3 to your computer and use it in GitHub Desktop.
Save tienthanh2509/9568cd0dfc4ef5156f0234df50def8f3 to your computer and use it in GitHub Desktop.
Termux SSHD for root user
export PATH=/data/data/com.termux/files/usr/bin:$PATH
sshd \
-D -dd \
-p 2222 -e
# /data/data/com.termux/files/usr/etc/ssh/sshd_config
PrintMotd yes
Port 2222
PermitRootLogin yes
PasswordAuthentication no
PubkeyAuthentication yes
AuthorizedKeysFile /data/authorized_keys
StrictModes no
Subsystem sftp /data/data/com.termux/files/usr/libexec/sftp-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment