A Magisk / KernelSU module that bundles a modern OpenSSH server for Android, complete with a built-in WebUI for managing the service, SSH keys, and configuration — no terminal required.
Built on top of MagiskSSH with the following patches applied:
- Data directory relocated from
/data/ssh→/data/adb/ssh sshdlogging enabled via-Eflag (/data/adb/ssh/sshd.log)- Legacy
install.shreplaced by a moderncustomize.sh - Injected WebUI (Svelte) + management scripts
| Feature | Description |
|---|---|
| 🔐 OpenSSH server | Full-featured sshd for Android (arm / arm64 / x86 / x86_64) |
| 🌐 WebUI | Browser-based dashboard via KernelSU's WebUI interface |
| 🗝️ SSH Key Manager | Add / remove authorized keys for root and shell users |
| ⚙️ Config Editor | Edit sshd_config directly from the browser |
| 📋 Log Viewer | Live and snapshot log viewing from /data/adb/ssh/sshd.log |
| ⚡ Action Button | One-tap SSH toggle from KernelSU Manager |
| 🌍 i18n | English / Chinese UI |
- Download the latest
magisk-ssh-*.zipfrom GitHub Releases or the Actions build artifacts. - In Magisk / KernelSU Manager, tap Install from storage and select the zip.
- Reboot.
After reboot, the SSH server starts automatically on port 22.
Open KernelSU Manager → Modules → MagiskSSH → Open WebUI to access:
- Dashboard — start / stop / restart sshd, view running status and port
- Key Manager — manage
authorized_keysforrootandshell - Config Editor — edit
sshd_configwith live save - Log Viewer — tail or snapshot
/data/adb/ssh/sshd.log
Tap the Action button in KernelSU Manager to toggle sshd on/off. A toast notification reports the result (port number or error).
# As root
ssh root@<device-ip> -p 22
# As shell user
ssh shell@<device-ip> -p 22Public keys are stored in:
/data/adb/ssh/root/.ssh/authorized_keys
/data/adb/ssh/shell/.ssh/authorized_keys
/data/adb/ssh/ ← Persistent SSH data (survives module updates)
├── sshd_config ← Server configuration
├── sshd.pid ← PID file
├── sshd.log ← Server log (enabled via -E flag)
├── root/.ssh/
│ └── authorized_keys
└── shell/.ssh/
└── authorized_keys
$MODPATH/ ← Module files (managed by Magisk/KernelSU)
├── opensshd.init ← Service init script
├── service.sh ← Boot-time autostart
├── action.sh ← Action button handler
├── system/bin/ ← Symlinks: ssh, sshd, scp, sftp, …
├── system/usr/libexec/ssh-core/ ← Real binaries + wrapper
├── webroot/ ← Built WebUI (injected at build time)
└── scripts/ ← Management scripts (api.sh, …)
The module is built entirely by GitHub Actions — no local toolchain required.
Push to master/main → build-webui job (npm build)
→ build-MagiskSSH job
├── Clone upstream MagiskSSH
├── Apply path patches (/data/ssh → /data/adb/ssh)
├── Cross-compile with NDK r25c
├── Inject WebUI + scripts + customize.sh
└── Upload zip artifact
To trigger a build manually: Actions → Build Magisk SSH → Run workflow.
cd ui-src
npm install
npm run dev # dev server at http://localhost:5173
npm run build # output → ../webroot/The WebUI is built with Svelte + Vite + TypeScript and communicates with the device via KernelSU's ksu.exec() / ksu.spawn() bridge, calling scripts/api.sh on the device.
| Script | Location | Purpose |
|---|---|---|
customize.sh |
module root | Magisk/KernelSU install hook — extracts and places all files |
service.sh |
module root | Boot autostart — starts sshd on every boot |
action.sh |
module root | KernelSU action button — toggles sshd |
api.sh |
scripts/ |
WebUI backend — dispatches all UI actions |
api.sh actions: status · start · stop · restart · read_config · write_config · read_keys · write_keys · add_key · delete_key · read_log · tail_log