ssh to Android emulators (with Termux)
Posted: Sat Mar 16, 2019 9:39 am
ssh to Android emulators (with Termux)
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:
Important: Copy .ssh/id_rsa and .ssh/id_rsa.pub into .ssh folder at client computer
For Nox:
For Bluestacks (same code as for Nox, just replacing 62001 with 5555)
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
pkg install openssh
ssh-keygen
cat .ssh/id_rsa.pub > .ssh/authorized_keys
sshd
For Nox:
Code: Select all
/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
Code: Select all
/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