Skip to content

caipiralink/magisk-ssh-server

Repository files navigation

SSH Server (Magisk Module)

Magisk module that runs OpenSSH 9.9p2 sshd on Android.

Binaries

Extracted from bnsmb's OpenSSH for Android Magisk module (OpenSSH 9.9p2, compiled with Android NDK r27b, API 33, arm64).

Binary Path
sshd /system/bin/sshd
ssh-keygen /system/bin/ssh-keygen
sshd-session /system/usr/libexec/sshd-session
sftp-server /system/usr/libexec/sftp-server

Authorized keys

Managed separately — not bundled in the module:

/data/adb/ssh/authorized_keys

Add your public key after flashing:

echo "ssh-ed25519 AAAA..." > /data/adb/ssh/authorized_keys

customize.sh creates a symlink from /data/local/tmp/home/.ssh/authorized_keys/data/adb/ssh/authorized_keys at install time. service.sh re-creates the symlink on every boot (since /data/local/tmp may be cleared).

Host keys

Generated automatically at install time by customize.sh and stored in the module overlay at /system/etc/ssh/. Persist across reboots via Magisk overlay.

Configuration

sshd_config highlights:

Setting Value
Port 22
PasswordAuthentication no
PubkeyAuthentication yes
PermitRootLogin prohibit-password
StrictModes no (required on Android)
UsePAM no

Requirements

  • Magisk 24+
  • arm64 device
  • Android 13+ (API 33+)

Tested on

  • Google Pixel 8 (shiba)
  • Android 16 (API 36), build CP1A.260305.018
  • Security patch level 2026-03-05
  • Magisk 30.7:MAGISK:R

License

This project is licensed under the MIT License. See LICENSE.

Bundled third-party tool notices are listed in THIRD_PARTY_NOTICES.

About

Magisk module that runs OpenSSH sshd on Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages