0

I'm having trouble with wireless SSH on a RPi 3 B+ running Raspbian Stretch.

I've enabled wifi via raspi-config

I've got an empty ssh file at the root directory.

I've got a /wpa_supplicant.conf file that lists my network info.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
country=<my country code>

network={
    ssid=<my ssid>
    psk=<password>
    key_mgmt=WPA-PSK
}

I can ssh into the RPi when attached using an ethernet cable but it fails when I try to run do it wirelessly. When I run ssh pi@<wlan0 inet address>, it times out.

Is there some other step that I need to perform in order to be able to ssh into the device wirelessly?

Update with more info

Here's the output of ip link show, ip addr show, and ip route show

ip link show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether b8:27:eb:29:84:8e brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DORMANT group default qlen 1000
    link/ether b8:27:eb:7c:d1:db brd ff:ff:ff:ff:ff:ff

ip addr show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:29:84:8e brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.2/24 brd 192.168.2.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::ad3:ab2d:41bd:7a/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:7c:d1:db brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.21/24 brd 192.168.11.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::36c7:9602:db6:2c3a/64 scope link 
       valid_lft forever preferred_lft forever

ip route show

default via 192.168.2.1 dev eth0 src 192.168.2.2 metric 202 
default via 192.168.11.1 dev wlan0 src 192.168.11.21 metric 303 
192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.2 metric 202 
192.168.11.0/24 dev wlan0 proto kernel scope link src 192.168.11.21 metric 303 
  • 1
    Ok.... some basics. Can you add the output of these commands into your question? ip link show ip addr show ip route show. – eftshift0 Aug 24 '18 at 4:05
  • 2
    on raspberry pi 3B+ you must set the country code - e.g. have country=XX (where XX depends on what part of the world you live in) in wpa_supplicant.conf – Jaromanda X Aug 24 '18 at 5:04
  • I've updated my post to include the output of those commands. – Ben Downey Aug 24 '18 at 13:00
  • Also, I've added in my country code to the wpa_supplicant.conf (right under the ctrl_interface line). I rebooted the Rpi but saw no change in behavior. – Ben Downey Aug 24 '18 at 13:01
  • You wrote "I've got an empty ssh file at the root directory". There is no root directory or do you mean / which is the root of the file system? That's wrong you have to put an empty file ssh into the directory /boot/. Simply done with sudo touch /boot/ssh. – Ingo Aug 24 '18 at 22:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.