Open Termux on Android and then execute the following commands:

pkg upgrade
pkg install openssh
passwd
whoami
sshd -e -d -d -d

On OSX:

# ssh username@<android_ip> -p8022
# ssh u0_412@<........> -p8022

To kill the server:

pkill sshd

sshd: no hostkeys available – exiting ssh-keygen -A

Bonus

pkg install termux-api