SSH onto RPi only works with Wifi disabled?

  • Hi,

    I just got myself a Raspberry Pi 3 B+ . It's running LibreELEC 9.1.001 (which has Kodi 18.3 Git: newclock5_18.3-Leia). The device is typically only connected via Wifi.

    I now noticed that I cannot seem to SSH into the device. In fact, I cannot even ping it. In the settings, I can see that it was assigned a plausible IP via DHCP, and any outgoing connections work (e.g. I can update Addons or stream movies). I noticed that I cannot SSH nor ping the device -- but it successfully connects to the Internet (i.e. incoming connections seem to fail, but outgoing works).

    To debug this further, I then hooked it up using Ethernet (in addition to Wifi) and rebooted. Both connections get sensible IPs but still - no ping, no SSH. Trying to e.g. SSH in just gives (.22 is the IP assigned to the Ethernet connection):

    Code
    MacBook-Pro:Downloads frerich$ ssh -vvv [email protected]
    OpenSSH_7.9p1, LibreSSL 2.7.3
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 48: Applying options for *
    debug2: resolve_canonicalize: hostname 192.168.0.22 is address
    debug2: ssh_connect_direct
    debug1: Connecting to 192.168.0.22 [192.168.0.22] port 22.
    ^C

    By accident, I noticed that I *can* ping the device and connect to it via SSH as soon as I go to the LibreELEC settings in Kodi and disable the Wifi connection. Without any reboot, the Ethernet connection starts working just fine.

    In fact, if I then re-enable the Wifi connection again and connect to the same Wifi network as before, I can *still* SSH in -- using both the Ethernet IP as well as the Wifi IP!

    If I now reboot again, I'm back to square one: the device does not seem to react to incoming connections unless I deactivate Wifi again.

    I.e. the bottom line is that the device does not seem to react to incoming connections if Wifi is enabled during bootup. Disabling it fixes this for the Ethernet connection, and after re-enabling Wifi it works fine via both Ethernet and Wifi (i.e. the state which I would like to have right after booting).

    Does this ring a bell with anyone? Any ideas what I could try to trace this down? Maybe some educated guesses as to what's causing this?

  • Thanks for the response! Unfortunately, no - setting the wait time to 30s and then rebooting doesn't seem to make a difference.

    For what it's worth, I was poking around in the output of `journalctl`, trying to spot something. When I boot with just Ethernet enabled (but no Wifi), I can SSH into the device. If I then activate Wifi in LibreELEC (but not connect to any network), I see these messages show up in the `journalctl` output:

    If I now associate with some network, I see these additional messages:

    Code
    Jun 27 17:59:32 LibreELEC wpa_supplicant[430]: wlan0: Failed to initiate sched scan
    Jun 27 17:59:50 LibreELEC connmand[348]: ipconfig state 2 ipconfig method 1
    Jun 27 17:59:53 LibreELEC wpa_supplicant[430]: wlan0: Trying to associate with SSID 'BKA Funkwagen 9'

    At this point, both interfaces have a plausible IP and I can ping as well as SSH via either IP.

    Now, I reboot (with having both Ethernet and Wifi enabled) and thus get the system into the problematic state again: outgoing connections appear to work, both interfaces have sensible IPs: but neither ping nor SSH works.

    Using the keyboard, I disable the Wifi connection again such that I can then SSH in via the Ethernet IP. I then extracted the output of journalctl since the reboot - you can find it at

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.
    (I suppose it's a bit long for posting it here). The last messages (starting at 18:04:30) are probably the ones caused by me disabling the Wifi connection in the GUI. At the very end, you can see the message of my SSH'ing into the device via the Ethernet connection.

    Is there maybe anything fishy in here?

    What surprised me is that in the output since the last boot, there is no sign of wpa_supplicant trying to associate with the SSID. Yet, in the GUI, it looks as if it associated (it has an IP address).

    Finally, I enabled Wifi in the GUI again and connected to some Wifi network. That caused these messages to show up in the journalctl output:

    External Content pastebin.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    Again, here one can see how it actually associates.