2

I have a desktop pc with ubuntu 18.04. It doesn't have a WiFi module and I also don't have a WiFi-USB-Dongle.

So I used USB-Tethering over my smartphone to provide access to the Internet and it works fine

Now I would like to ssh my desktop pc from my laptop.

openssh-server is running and my smartphone use the same WiFi as the laptop.

ifconfig show me these interfaces:

  • docker0

  • enp0s26u1u6 (the only one show me a private ipv4 address)

  • enp3s0

  • lo

  • vethae388a7

I tried all IPv4 and IPv6 adsresses and I alway get timeout-error.

Is it possible at all to connect to the pc over ssh while using usb-tethering and what do vethae388a7, and both enp* interfaces mean?

Thanks for advice

Amit
  • 43

1 Answers1

2

The android phone creates a separate network for the connected computer, effectively shielding it from any incoming signals. So you cannot really connect without tweaking the android phone. One good way to do it is the iptable modification.

When tethering the phone behaves like a router (wifi on eth0 and the tethered computer on usb0). You have to use iptables to route the traffic from port 22 of the device to port 22 of the connected device and accept traffic on port 22.

Check out this answer. But fair warning, this requires your phone to be rooted!

rroy
  • 21