User avatar
harshatech2012
Posts: 15
Joined: Sun Nov 15, 2015 8:40 pm
Location: India

Unable to SSH into Pi 3 over Wifi

Wed Mar 15, 2017 6:54 am

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:
-- 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.
I start a Wi-Fi hotspot on windows laptop and connect Pi 3 to it. The wlan ip assigned to Pi 3 is 192.168.137.33.
Now there are two cases:
-- Disconnect the Ethernet connection between the Pi's, then SSH from windows (PuTTY) to Pi 3 over Wi-Fi
-- Keeping the Ethernet connected between the 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.
harshatech2012

Ernst
Posts: 1337
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Unable to SSH into Pi 3 over Wifi

Wed Mar 15, 2017 7:50 am

This is a difficult configuration because of routing, there is no simple solutions using the static addresses that you are using. On the Pi3 (with WiFi and ethernet) there will be a route to 192.168.137.0/24 with a low metric to the eth0 interface and a higher metric to the wlan0 interface. When you connect from the PC using Putty the wlan0 interface receives your packets but the Pi uses the ethernet interface to send the packets to the PC causing the time out.

The simplest solutions is to use a different network (=subnet) on the ethernet between the Pi3 and the Pi2 AND to use the Pi3 as a "hopping" station to reach Pi2. What this means is that you configure eth0 on the Pi3 with an address like 192.168.138.2/24 and on the Pi2 with 192.168.138.1/24. Then you will be able to use Putty on the PC to connect to the Pi3 using 192.168.137.33 which allows you to use ssh on the Pi3 to connect to the Pi2 using the address 192.168.138.1.

But there are other problems that you must be aware of, I assume that you are using ICS (Internet Connection Sharing) on the PC, because of this you will not be able to access the internet from Pi2 because the PC does not know the 192.168.138.0/24 network.

The best solution is to get a WiFi dongle to be able to connect the Pi2 using WiFi
The road to insanity is paved with static ip addresses

User avatar
harshatech2012
Posts: 15
Joined: Sun Nov 15, 2015 8:40 pm
Location: India

Re: Unable to SSH into Pi 3 over Wifi

Thu Mar 16, 2017 1:32 pm

Looks like choosing a different network IP for Ethernet and Wi-Fi solved the problem. I used the 192.168.137.xxx for wlan0 and static IP of 192.168.120.xxx for eth0. Now I am able to connect to RPi-3 using putty (over Wi-Fi) and through this session SSH into RPi-2 (connected to RPi-3 via Ethernet)
harshatech2012

RaspISteve
Posts: 100
Joined: Wed Oct 24, 2012 9:15 pm
Location: Cheltenham, UK

Re: Unable to SSH into Pi 3 over Wifi

Fri Mar 17, 2017 10:43 pm

Guys,
I had a problem trying to SSH between my various Pi units. WiFi to/from a ethernet wired unit was no problem. However, it was a dead duck trying to go between two units both on the same WiFi. Seems most (ALL??) WiFi routers don't/won't route WiFi to/from WiFi. Some clever fellow here helped me with this one.

I get around it now having added a second WiFi router to my original WiFi network plus it doubles as a wired router. Note, I disabled the second router's ADSL functions and DHCP so the master router get to manage things.
Share and Enjoy.

User avatar
HawaiianPi
Posts: 5968
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Unable to SSH into Pi 3 over Wifi

Sat Mar 18, 2017 7:47 am

RaspISteve wrote:Guys,
...Seems most (ALL??) WiFi routers don't/won't route WiFi to/from WiFi...
WiFi is just another network connection. SSH doesn't care how it is connected to the network. Both my Pi-Zero and Pi3 are wireless on the same router. I have no problem connecting from my Pi3 to my Pi-Zero, or from my wireless Windows-10 or Linux computers to either wireless Pi, or from any of these wireless computers to my wired NAS.

There is no logical reason a router would not allow wireless to wireless connections. Something in your configuration is messed up.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
rpdom
Posts: 17550
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Unable to SSH into Pi 3 over Wifi

Sat Mar 18, 2017 8:06 am

HawaiianPi wrote:There is no logical reason a router would not allow wireless to wireless connections. Something in your configuration is messed up.
There is, and some do. Usually you can disable that restriction.

I believe the idea is that various people in your household may be using your WiFi, but you don't want them to be able to access each others computers. This would also be the case for a small business that provides free WiFi for customers - keeping each computer isolated is a safety factor.

Ernst
Posts: 1337
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Unable to SSH into Pi 3 over Wifi

Sat Mar 18, 2017 8:12 am

RaspISteve wrote:Seems most (ALL??) WiFi routers don't/won't route WiFi to/from WiFi.
It is very difficult to give a definitive answer because there are so many WiFi routers, but on some routers it is a configurable (security) feature called something like "Wireless Client Isolation".

The following is from the documentation of my Intellinet AC1200 WiFi access point:
Wireless Client Isolation
Enable or disable wireless client isolation.
Wireless client isolation prevents clients
connected to the access point from
communicating with each other and improves
security. Typically, this function is useful for
corporate environments or public hotspots and
can prevent brute force attacks on clients’
usernames and passwords
The road to insanity is paved with static ip addresses

User avatar
HawaiianPi
Posts: 5968
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Unable to SSH into Pi 3 over Wifi

Sun Mar 19, 2017 7:21 am

HawaiianPi wrote:There is no logical reason a router would not allow wireless to wireless connections. Something in your configuration is messed up.
rpdom wrote:There is, and some do. Usually you can disable that restriction...
Which is why I said something in the configuration is messed up. Although I suppose I could have phrased it more precisely...

There is no logical reason a home router would not allow wireless to wireless connections by default.

But ultimately the point is that the original router is configured incorrectly, if the goal is interconnectivity between all devices on the network. The second router should not have been needed.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

palomasanchez
Posts: 1
Joined: Wed Mar 22, 2017 12:18 pm
Contact: Website

Re: Unable to SSH into Pi 3 over Wifi

Wed Mar 22, 2017 12:28 pm

RaspISteve wrote:Guys,
I had a problem trying to SSH between my various Pi units. WiFi to/from a ethernet wired unit was no problem. However, it was a dead duck trying to go between two units both on the same WiFi. Seems most (ALL??) WiFi routers don't/won't route WiFi to/from WiFi. Some clever fellow here helped me with this one.

I get around it now having added a second WiFi router to my original WiFi network plus it doubles as a wired router. Note, I disabled the second router's ADSL functions and DHCP so the master router get to manage things.
Hi there,
Might the problem be caused by the ADSL internet conexion? I mean I have ADSL Yazztel https://www.ofertaadsl.es/ and the speed is not so good.
Marketing Research especializado en el sector de las telecomunicaciones.

Return to “Advanced users”