In the emulator:
1. Go to settings, "About tablet" and click 5 times on "build number" to activate "Developer mode"
2. Go to settings, "Developer options" and select "USB debugging"
In Termux:
- Code: Select all Expand view RUN
- pkg install openssh
ssh-keygen
cat .ssh/id_rsa.pub > .ssh/authorized_keys
sshd
Important: Copy .ssh/id_rsa and .ssh/id_rsa.pub into .ssh folder at client computer
For Nox:
- Code: Select all Expand view RUN
- /Users/$USER/Library/Android/sdk/platform-tools/adb connect localhost:62001
/Users/$USER/Library/Android/sdk/platform-tools/adb -s localhost:62001 forward tcp:8022 tcp:8022
ssh localhost -p 8022
For Bluestacks (same code as for Nox, just replacing 62001 with 5555)
- Code: Select all Expand view RUN
- /Users/$USER/Library/Android/sdk/platform-tools/adb connect localhost:5555
/Users/$USER/Library/Android/sdk/platform-tools/adb -s localhost:5555 forward tcp:8022 tcp:8022
ssh localhost -p 8022