No connection through SSH over WIfi after kernel update

Asked by Stefan

After updating from kernel "linux-image-5.3.0-1007-raspi2" to "linux-image-5.3.0-1012-raspi2" I no longer can establish SSH connection to Raspberry over Wifi.
When it is wired, SSH connection works and initial screen shows that both adapters (eth0 and wlan0) are connected and have their IPs. Making SSH session with both IPs is successful.

When I disconnect the wire, SSH is no longer possible (host unreachable).
The router is showing that the Rasperry is connected to the Wifi network. I tried with restart, but it's again connected to the router but not reachable over SSH.

The system is Raspberry Pi 4, 4GB with Ubuntu server X64 image.

I will be grateful for any ideas how to solve this.

Thank you.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Did you configure any firewall rules on the system?

Did you try:

ssh -vvvv username@server

So you can see the connection being brought up and can spot issues..

Revision history for this message
Stefan (fhnt) said :
#2

I checked the firewall status by "ufw status" and it's inactive.

I'm using MobaXterm under Windows to connect to the Raspberry and I don't know if (or how) I can use "ssh -vvvv username@server".

It's a clean image so far. I didn't install or change anything so far, except connecting it to the Wifi by changing "/etc/netplan/50-cloud-init.yaml" and applying it with "sudo netplan apply". I wanted to solve this first.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

It's a terminal command, like the one you type commands into. What are you using to SSH? PuTTY?

Revision history for this message
Stefan (fhnt) said :
#4

I'm using MobaXterm, but I also have PUTTY. The result is the same with both.

Currently is connected by wire with SSH to the wired IP. By running "ssh -vvvv username@server" for the Wifi IP it returns:

OpenSSH_8.0p1 Ubuntu-6build1, OpenSSL 1.1.1c 28 May 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.0.57 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.0.57 [192.168.0.57] port 22.
debug1: Connection established.
debug1: identity file /home/hnt/.ssh/id_rsa type -1
debug1: identity file /home/hnt/.ssh/id_rsa-cert type -1
debug1: identity file /home/hnt/.ssh/id_dsa type -1
debug1: identity file /home/hnt/.ssh/id_dsa-cert type -1
debug1: identity file /home/hnt/.ssh/id_ecdsa type -1
debug1: identity file /home/hnt/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/hnt/.ssh/id_ed25519 type -1
debug1: identity file /home/hnt/.ssh/id_ed25519-cert type -1
debug1: identity file /home/hnt/.ssh/id_xmss type -1
debug1: identity file /home/hnt/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.0p1 Ubuntu-6build1
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.0p1 Ubuntu-6build1
debug1: match: OpenSSH_8.0p1 Ubuntu-6build1 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.0.57:22 as 'hnt'
debug3: hostkeys_foreach: reading file "/home/hnt/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/hnt/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys from 192.168.0.57
debug3: order_hostkeyalgs: prefer hostkeyalgs: <email address hidden>,<email address hidden>,<email address hidden>,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,<email address hidden>,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: <email address hidden>,<email address hidden>,<email address hidden>,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: <email address hidden>,aes128-ctr,aes192-ctr,aes256-ctr,<email address hidden>,<email address hidden>
debug2: ciphers stoc: <email address hidden>,aes128-ctr,aes192-ctr,aes256-ctr,<email address hidden>,<email address hidden>
debug2: MACs ctos: <email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: <email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,<email address hidden>,zlib
debug2: compression stoc: none,<email address hidden>,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,<email address hidden>,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: <email address hidden>,aes128-ctr,aes192-ctr,aes256-ctr,<email address hidden>,<email address hidden>
debug2: ciphers stoc: <email address hidden>,aes128-ctr,aes192-ctr,aes256-ctr,<email address hidden>,<email address hidden>
debug2: MACs ctos: <email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: <email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,<email address hidden>
debug2: compression stoc: none,<email address hidden>
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: <email address hidden> MAC: <implicit> compression: none
debug1: kex: client->server cipher: <email address hidden> MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:2LhlimGymAChLtvi7thstPyahIzG52d5dPquBQxU7/0
debug3: hostkeys_foreach: reading file "/home/hnt/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/hnt/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys from 192.168.0.57
debug1: Host '192.168.0.57' is known and matches the ECDSA host key.
debug1: Found key in /home/hnt/.ssh/known_hosts:2
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /home/hnt/.ssh/id_rsa
debug1: Will attempt key: /home/hnt/.ssh/id_dsa
debug1: Will attempt key: /home/hnt/.ssh/id_ecdsa
debug1: Will attempt key: /home/hnt/.ssh/id_ed25519
debug1: Will attempt key: /home/hnt/.ssh/id_xmss
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/hnt/.ssh/id_rsa
debug3: no such identity: /home/hnt/.ssh/id_rsa: No such file or directory
debug1: Trying private key: /home/hnt/.ssh/id_dsa
debug3: no such identity: /home/hnt/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /home/hnt/.ssh/id_ecdsa
debug3: no such identity: /home/hnt/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/hnt/.ssh/id_ed25519
debug3: no such identity: /home/hnt/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /home/hnt/.ssh/id_xmss
debug3: no such identity: /home/hnt/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
hnt@192.168.0.57's password:
debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (password).
Authenticated to 192.168.0.57 ([192.168.0.57]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting <email address hidden>
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 80
debug1: client_input_global_request: rtype <email address hidden> want_reply 0
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: send packet: type 98
debug1: Sending environment.
debug3: Ignored env SHELL
debug3: Ignored env PWD
debug3: Ignored env LOGNAME
debug3: Ignored env XDG_SESSION_TYPE
debug3: Ignored env HOME
debug1: Sending env LANG = C.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env LS_COLORS
debug3: Ignored env SSH_CONNECTION
debug3: Ignored env LESSCLOSE
debug3: Ignored env XDG_SESSION_CLASS
debug3: Ignored env TERM
debug3: Ignored env LESSOPEN
debug3: Ignored env USER
debug3: Ignored env DISPLAY
debug3: Ignored env SHLVL
debug3: Ignored env XDG_SESSION_ID
debug3: Ignored env XDG_RUNTIME_DIR
debug3: Ignored env SSH_CLIENT
debug3: Ignored env XDG_DATA_DIRS
debug3: Ignored env PATH
debug3: Ignored env DBUS_SESSION_BUS_ADDRESS
debug3: Ignored env SSH_TTY
debug3: Ignored env _
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
Welcome to Ubuntu 19.10 (GNU/Linux 5.3.0-1012-raspi2 aarch64)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Looks fine. You typed your password and the last line says welcome. You connected OK

Revision history for this message
Stefan (fhnt) said :
#6

Yes, but this is while it's connected with ethernet cable and wifi. If I remove the ethernet cable I no longer can connect.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

OK connect it to the WiFi only then rerun the command on the client, giving the output as before

Revision history for this message
Stefan (fhnt) said :
#8

That is the problem. I cannot establish SSH session while the Raspberry is connected only to the Wifi.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

Yes but you can generate the text then connect back to the wired afterwards......

Revision history for this message
Stefan (fhnt) said :
#10

Ok, I've got your point. Here is the result:

  17/11/2019   13:06.56   /home/mobaxterm  ssh -vvv hnt@192.168.0.57
OpenSSH_7.5p1, OpenSSL 1.0.2o 27 Mar 2018
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 13: Deprecated option "useroaming"
debug2: resolving "192.168.0.57" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.0.57 [192.168.0.57] port 22.
debug1: connect to address 192.168.0.57 port 22: Connection timed out
ssh: connect to host 192.168.0.57 port 22: Connection timed out

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

On the WiFi only, what is the output of:

sudo lshw -C network; ifconfig

Thanks

Revision history for this message
Stefan (fhnt) said :
#12

I don't have a monitor for the Raspberry, so I'm running headless. I obviously can't run "sudo lshw -C network; ifconfig" on wifi only, but here is the output when connected by cable and wifi:

hnt@ubuntu:~$ sudo lshw -C network; ifconfig
[sudo] password for hnt:
  *-network:0
       description: Wireless interface
       physical id: 2
       logical name: wlan0
       serial: dc:a6:32:1c:19:7c
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=brcmfmac driverversion=7.45.18 firmware=01-6a2c8ad4 ip=192.168.0.57 multicast=yes wireless=IEEE 802.11
  *-network:1
       description: Ethernet interface
       physical id: 3
       logical name: eth0
       serial: dc:a6:32:1c:19:7b
       size: 100Mbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=bcmgenet driverversion=v2.0 duplex=full ip=192.168.0.58 link=yes multicast=yes port=MII speed=100Mbit/s
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 192.168.0.58 netmask 255.255.255.0 broadcast 192.168.0.255
        inet6 fe80::dea6:32ff:fe1c:197b prefixlen 64 scopeid 0x20<link>
        ether dc:a6:32:1c:19:7b txqueuelen 1000 (Ethernet)
        RX packets 243 bytes 24852 (24.8 KB)
        RX errors 0 dropped 27 overruns 0 frame 0
        TX packets 290 bytes 36934 (36.9 KB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
        inet 127.0.0.1 netmask 255.0.0.0
        inet6 ::1 prefixlen 128 scopeid 0x10<host>
        loop txqueuelen 1000 (Local Loopback)
        RX packets 22 bytes 1782 (1.7 KB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 22 bytes 1782 (1.7 KB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 192.168.0.57 netmask 255.255.255.0 broadcast 192.168.0.255
        inet6 fe80::dea6:32ff:fe1c:197c prefixlen 64 scopeid 0x20<link>
        ether dc:a6:32:1c:19:7c txqueuelen 1000 (Ethernet)
        RX packets 31 bytes 2694 (2.6 KB)
        RX errors 0 dropped 26 overruns 0 frame 0
        TX packets 15 bytes 2134 (2.1 KB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#13

Do you have a firewall on the client? You may want to reboot your router too. This may help

Revision history for this message
Stefan (fhnt) said :
#14

No firewall enabled on the client. The router was restarted multiple times.
As I mentioned the issue appeared right after updating from kernel "linux-image-5.3.0-1007-raspi2" to "linux-image-5.3.0-1012-raspi2". So I assume it's directly related to the new kernel. No issues before that.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#15

I suggest you report a bug

Can you help with this problem?

Provide an answer of your own, or ask Stefan for more information if necessary.

To post a message you must log in.