I have a Meizu M8 phone running android with Termux. I had set up ssh access to Termux over WiFi, but I want to be able to do that over USB because of possibly lower latency and higher speed. If I connect the phone to my macbook using USB, I can use adb to get shell or transfer files, so I think ssh over USB is possible. How can I achieve this?
Asked
Active
Viewed 41 times
adb
(forward device port to a port on your mac). Then the SSH port would be tunneled through the adb (USB) connection. In the end you could connect via ssh to a port on localhost and end up on the device. – Robert Jun 25 '20 at 07:46adb
over USB, simply useadb pull
andadb push
oradbfs
for data transfer. No need to use SSH. In my previous comment I though you are using USB tethering. // Port forwarding is explained here: https://android.stackexchange.com/a/207342/218526 – Irfan Latif Jun 26 '20 at 09:35