I have two Pi's, one is Pi 3 Model B and the other is Pi 2 model B. I have connected the Pi's together via Ethernet. The Pi's have been assigned static IP address (modified the dhcpcd.conf
file):
- Pi 3 (eth0 ip) --> 192.168.137.170
- Pi 2 (eth0 ip) --> 192.168.137.10
I am able to SSH from Pi 3 to Pi 2 and vice versa over the Ethernet connection.
Now, I start a Wi-Fi hotspot on Windows laptop and connect Pi 3 to it. The wlan0 IP assigned to Pi 3 is 192.168.137.33.
(So, Pi 3 Now has two IP's eth0 and wlan0).
Now there are two cases:
Disconnect the Ethernet connection between the Pi's, then SSH from windows (PuTTY) to Pi 3 over Wi-Fi. This works!
Keeping the Ethernet connected between the two Pi's, then trying to SSH from windows (PuTTY) to Pi 3 over Wi-Fi doesn't work. PuTTY throws "Connection timed out" error.
I would like to SSH from windows into Pi 3 over Wi-Fi, then through this PuTTY session SSH into Pi 2 over Ethernet. Could please someone help me how to do it.
interface eth0 static ip_address=192.168.0.101 interface wlan0 static ip_address=192.168.0.100 static routers=192.168.0.1 static domain_name_servers=192.168.0.1
. Why is your ip is192.168.137.xxx
while your router is192.168.0.1
? is your netmask set on your router set as255.255.0.0
?