ssh to Android emulators (with Termux)

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

ssh to Android emulators (with Termux)

Post by Antonio Linares »

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:

Code: Select all

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

/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

/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
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply