I'm connecting 2 different devices (laptop and desktop) to internet with my mobile phone. I connected my phone to my desktop via USB and enabled USB tethering. I've also enabled hotspot to connect my laptop via Wi-Fi. Now, both devices are connected to my phone and I want to ssh from one to other.
# my laptop
❯ ifconfig | grep 192 -B1
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.43.186 netmask 255.255.255.0 broadcast 192.168.43.255
# my desktop
❯ ifconfig | grep 192 -B1
enp0s26u1u3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.42.17 netmask 255.255.255.0 broadcast 192.168.42.255
In my laptop, I run:
ssh "[email protected]"
But it doesn't do anything. I've read that both devices needs to be in the same network in order to do this but I can't connect my desktop with wifi because I don't have a wifi adapter. With the current setup what should I change to make this work?