This Magisk module contains OpenSSH 10.3p1 using the libraries from OpenSSL 3.5.7 for Android

ASUS_I006D:/ $ /system/bin/sshd -V
OpenSSH_10.3p1, OpenSSL 3.5.7 9 Jun 2026
ASUS_I006D:/ $ 

ASUS_I006D:/ $ /system/bin/ssh -V                                                                                                                                                                                                    
OpenSSH_10.3p1, OpenSSL 3.5.7 9 Jun 2026
ASUS_I006D:/ $ 

These OpenSSH binaries are compiled with SELinux support.


All binaries are dynamically linked for the default Android libraries only , e.g:

ASUS_I006D:/ $  ldd /system/bin/sshd
	linux-vdso.so.1 => [vdso] (0x7594930000)
	libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x758f86c000)
	libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x758f8a7000)
ASUS_I006D:/ $                                                                                                                                                                                                                       

ASUS_I006D:/ $ ldd /system/bin/ssh
	linux-vdso.so.1 => [vdso] (0x73ab10d000)
	libdl.so => /apex/com.android.runtime/lib64/bionic/libdl.so (0x73a7c16000)
	libc.so => /apex/com.android.runtime/lib64/bionic/libc.so (0x73a7c55000)
ASUS_I006D:/ $ 

To automatically start the sshd after a reboot create the file

/data/local/tmp/home/start_sshd

To define additional parameter for the automatic start of the sshd, save these parameter in the file

/data/local/tmp/home/.ssh/sshd_parameter


To write the messages from the script service.sh to the log file

/data/local/tmp/var/log/sshd.log

create the file

/data/local/tmp/debug


The default port used by the sshd is 9022:

ASUS_I006D:/ $ grep -i 9022 /etc/ssh/sshd_config
Port 9022
ASUS_I006D:/ $ 


Compile details
---------------

The configure options used are copied from the Termux Build script for OpenSSH:

    https://github.com/termux/termux-packages/blob/master/packages/openssh/build.sh

The configure command used to create the config for Compiling OpenSSH in Android is in the file

   source/myconfigure

in the Magisk Module

All patches for OpenSSH from Termux that are useful for a Magisk Module with OpenSSH are applied to the source code.

The patches for OpenSSH in Termux are available here:

    https://github.com/termux/termux-packages/tree/master/packages/openssh

The patches used are in the directory ./source/patches in the Magisk Module; the patches were copied from the repo at 2026-06-12.
The script source/patches/apply_patches.sh can be used to apply the patches.



Trouble Shooting

Due to the energy saving functions of Android, the wifi connection can be put into sleep mode too often, so that the ssh connection to the phone is very sluggish. To work around this problem, start a ping command in the background to use the WIfi connection continuously, e.g:

ping -i 0.2 192.168.1.1 >/dev/null & 


To execute the customize script of the Magisk Module with "set -x" and write STDOUT and STDERR to the file /data/local/tmp/openssh_customize.log create the (probably empty) file /data/local/tmp/debug before installing the Magisk Module.


To execute the service script to start the sshd with "set -x" and write STDERR and STDLOG messages to the file /data/local/tmp/start_sshd.log create the file /data/local/tmp/debug before rebooting the phone.


 ---

History

14.06.2026 10.3p1.v1.0.0
  initial release


