SSH Works fine through Wireguard, fails over Wifi

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

SSH Works fine through Wireguard, fails over Wifi

Post by /RaspberryPi »


I've got a very strange problem, and I already spend several hours trying to troubleshoot, and maybe some of you guys can help.

My Rasberry Pi (Running rasbperrypios without GUI) is connected to my 2.4Ghz wi-fi with the IP 192.168.100.40. I've set up a pivpn server on a VPS server. The IP the raspberry pi get from the VPN is 10.6.168.11

From any machine on my home network (192.168.100.0/24) I can ping the Raspberry Pi, and I can open its HTTP server (It runs Octoprint) without problems or delays. Also, with any machine connected to the same VPN (10.6.168.0/24) I can also ping and open the HTTP sever.

But I can't SSH on the IP 192.168.100.40. Problem is, is not just a connection refused. The connection happens, but hangs. Sometimes I get the MOTD banner and it hangs on the bash prompt, sometimes hangs just after I input the password. If I SSH through the VPN IP (10.6.168.11) it works flawless and fast, don't hang, it is as it should be.

When the connect through this VPN IP, I also get the message showing that the last login was from a local IP (which just hangs) Last login: Sat Jul 29 11:12:06 2023 from [192.168.100.38](https://192.168.100.38)

Also the problem is intermitent. Somedays it just works fine, somedays it works but very slow (like take about 1minute to log in and keypresses take few seconds to show)

Today I ran ssh with the -vvvv switch. When it works, it's like this:

``` ❯ ssh -vvvv [url=mailto:pi@dolores.vpn]pi@dolores.vpn[/url] OpenSSH_9.3p1 Debian-1, OpenSSL 3.0.9 30 May 2023 debug1: Reading configuration data /home/fellipec/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/.conf matched no files debug1: /etc/ssh/ssh_config line 21: Applying options for * debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/fellipec/.ssh/known_hosts' debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/fellipec/.ssh/known_hosts2' debug2: resolving "dolores.vpn" port 22 debug3: resolve_host: lookup dolores.vpn:22 debug3: ssh_connect_direct: entering debug1: Connecting to dolores.vpn [10.6.158.11] port 22. debug3: set_sock_tos: set socket 3 IP_TOS 0x10 debug1: Connection established. debug1: identity file /home/fellipec/.ssh/id_rsa type 0 debug1: identity file /home/fellipec/.ssh/id_rsa-cert type -1 debug1: identity file /home/fellipec/.ssh/id_ecdsa type -1 debug1: identity file /home/fellipec/.ssh/id_ecdsa-cert type -1 debug1: identity file /home/fellipec/.ssh/id_ecdsa_sk type -1 debug1: identity file /home/fellipec/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /home/fellipec/.ssh/id_ed25519 type -1 debug1: identity file /home/fellipec/.ssh/id_ed25519-cert type -1 debug1: identity file /home/fellipec/.ssh/id_ed25519_sk type -1 debug1: identity file /home/fellipec/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /home/fellipec/.ssh/id_xmss type -1 debug1: identity file /home/fellipec/.ssh/id_xmss-cert type -1 debug1: identity file /home/fellipec/.ssh/id_dsa type -1 debug1: identity file /home/fellipec/.ssh/id_dsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_9.3p1 Debian-1 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.4p1 Debian-5+deb11u1 debug1: compat_banner: match: OpenSSH_8.4p1 Debian-5+deb11u1 pat OpenSSH compat 0x04000000 debug2: fd 3 setting O_NONBLOCK debug1: Authenticating to dolores.vpn:22 as 'pi' debug3: record_hostkey: found key type ED25519 in file /home/fellipec/.ssh/known_hosts:87 debug3: load_hostkeys_file: loaded 1 keys from dolores.vpn debug1: load_hostkeys: fopen /home/fellipec/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug3: order_hostkeyalgs: have matching best-preference key type [url=mailto:ssh-ed25519-cert-v01@openssh.com]ssh-ed25519-cert-v01@openssh.com[/url], using HostkeyAlgorithms verbatim 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: [url=mailto:sntrup761x25519-sha512@openssh.com]sntrup761x25519-sha512@openssh.com[/url],curve25519-sha256,[url=mailto:curve25519-sha256@libssh.org]curve25519-sha256@libssh.org[/url],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,ext-info-c debug2: host key algorithms: [url=mailto:ssh-ed25519-cert-v01@openssh.com]ssh-ed25519-cert-v01@openssh.com[/url],[url=mailto:ecdsa-sha2-nistp256-cert-v01@openssh.com]ecdsa-sha2-nistp256-cert-v01@openssh.com[/url],[url=mailto:ecdsa-sha2-nistp384-cert-v01@openssh.com]ecdsa-sha2-nistp384-cert-v01@openssh.com[/url],[url=mailto:ecdsa-sha2-nistp521-cert-v01@openssh.com]ecdsa-sha2-nistp521-cert-v01@openssh.com[/url],[url=mailto:sk-ssh-ed25519-cert-v01@openssh.com]sk-ssh-ed25519-cert-v01@openssh.com[/url],[url=mailto:sk-ecdsa-sha2-nistp256-cert-v01@openssh.com]sk-ecdsa-sha2-nistp256-cert-v01@openssh.com[/url],[url=mailto:rsa-sha2-512-cert-v01@openssh.com]rsa-sha2-512-cert-v01@openssh.com[/url],[url=mailto:rsa-sha2-256-cert-v01@openssh.com]rsa-sha2-256-cert-v01@openssh.com[/url],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[url=mailto:sk-ssh-ed25519@openssh.com]sk-ssh-ed25519@openssh.com[/url],[url=mailto:sk-ecdsa-sha2-nistp256@openssh.com]sk-ecdsa-sha2-nistp256@openssh.com[/url],rsa-sha2-512,rsa-sha2-256 debug2: ciphers ctos: [url=mailto:chacha20-poly1305@openssh.com]chacha20-poly1305@openssh.com[/url],aes128-ctr,aes192-ctr,aes256-ctr,[url=mailto:aes128-gcm@openssh.com]aes128-gcm@openssh.com[/url],[url=mailto:aes256-gcm@openssh.com]aes256-gcm@openssh.com[/url] debug2: ciphers stoc: [url=mailto:chacha20-poly1305@openssh.com]chacha20-poly1305@openssh.com[/url],aes128-ctr,aes192-ctr,aes256-ctr,[url=mailto:aes128-gcm@openssh.com]aes128-gcm@openssh.com[/url],[url=mailto:aes256-gcm@openssh.com]aes256-gcm@openssh.com[/url] debug2: MACs ctos: [url=mailto:umac-64-etm@openssh.com]umac-64-etm@openssh.com[/url],[url=mailto:umac-128-etm@openssh.com]umac-128-etm@openssh.com[/url],[url=mailto:hmac-sha2-256-etm@openssh.com]hmac-sha2-256-etm@openssh.com[/url],[url=mailto:hmac-sha2-512-etm@openssh.com]hmac-sha2-512-etm@openssh.com[/url],[url=mailto:hmac-sha1-etm@openssh.com]hmac-sha1-etm@openssh.com[/url],[url=mailto:umac-64@openssh.com]umac-64@openssh.com[/url],[url=mailto:umac-128@openssh.com]umac-128@openssh.com[/url],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: [url=mailto:umac-64-etm@openssh.com]umac-64-etm@openssh.com[/url],[url=mailto:umac-128-etm@openssh.com]umac-128-etm@openssh.com[/url],[url=mailto:hmac-sha2-256-etm@openssh.com]hmac-sha2-256-etm@openssh.com[/url],[url=mailto:hmac-sha2-512-etm@openssh.com]hmac-sha2-512-etm@openssh.com[/url],[url=mailto:hmac-sha1-etm@openssh.com]hmac-sha1-etm@openssh.com[/url],[url=mailto:umac-64@openssh.com]umac-64@openssh.com[/url],[url=mailto:umac-128@openssh.com]umac-128@openssh.com[/url],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: compression ctos: none,[url=mailto:zlib@openssh.com]zlib@openssh.com[/url],zlib debug2: compression stoc: none,[url=mailto:zlib@openssh.com]zlib@openssh.com[/url],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,[url=mailto:curve25519-sha256@libssh.org]curve25519-sha256@libssh.org[/url],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 debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 debug2: ciphers ctos: [url=mailto:chacha20-poly1305@openssh.com]chacha20-poly1305@openssh.com[/url],aes128-ctr,aes192-ctr,aes256-ctr,[url=mailto:aes128-gcm@openssh.com]aes128-gcm@openssh.com[/url],[url=mailto:aes256-gcm@openssh.com]aes256-gcm@openssh.com[/url] debug2: ciphers stoc: [url=mailto:chacha20-poly1305@openssh.com]chacha20-poly1305@openssh.com[/url],aes128-ctr,aes192-ctr,aes256-ctr,[url=mailto:aes128-gcm@openssh.com]aes128-gcm@openssh.com[/url],[url=mailto:aes256-gcm@openssh.com]aes256-gcm@openssh.com[/url] debug2: MACs ctos: [url=mailto:umac-64-etm@openssh.com]umac-64-etm@openssh.com[/url],[url=mailto:umac-128-etm@openssh.com]umac-128-etm@openssh.com[/url],[url=mailto:hmac-sha2-256-etm@openssh.com]hmac-sha2-256-etm@openssh.com[/url],[url=mailto:hmac-sha2-512-etm@openssh.com]hmac-sha2-512-etm@openssh.com[/url],[url=mailto:hmac-sha1-etm@openssh.com]hmac-sha1-etm@openssh.com[/url],[url=mailto:umac-64@openssh.com]umac-64@openssh.com[/url],[url=mailto:umac-128@openssh.com]umac-128@openssh.com[/url],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: [url=mailto:umac-64-etm@openssh.com]umac-64-etm@openssh.com[/url],[url=mailto:umac-128-etm@openssh.com]umac-128-etm@openssh.com[/url],[url=mailto:hmac-sha2-256-etm@openssh.com]hmac-sha2-256-etm@openssh.com[/url],[url=mailto:hmac-sha2-512-etm@openssh.com]hmac-sha2-512-etm@openssh.com[/url],[url=mailto:hmac-sha1-etm@openssh.com]hmac-sha1-etm@openssh.com[/url],[url=mailto:umac-64@openssh.com]umac-64@openssh.com[/url],[url=mailto:umac-128@openssh.com]umac-128@openssh.com[/url],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: compression ctos: none,[url=mailto:zlib@openssh.com]zlib@openssh.com[/url] debug2: compression stoc: none,[url=mailto:zlib@openssh.com]zlib@openssh.com[/url] debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: [url=mailto:chacha20-poly1305@openssh.com]chacha20-poly1305@openssh.com[/url] MAC: compression: none debug1: kex: client->server cipher: [url=mailto:chacha20-poly1305@openssh.com]chacha20-poly1305@openssh.com[/url] MAC: compression: none debug3: send packet: type 30 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug3: receive packet: type 31 debug1: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ssh-ed25519 SHA256:ERH13dv6ZPNwL7zaQgQsXrzZNfXHEqiIwIXHFfTyQYo debug3: record_hostkey: found key type ED25519 in file /home/fellipec/.ssh/known_hosts:87 debug3: load_hostkeys_file: loaded 1 keys from dolores.vpn debug1: load_hostkeys: fopen /home/fellipec/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: Host 'dolores.vpn' is known and matches the ED25519 host key. debug1: Found key in /home/fellipec/.ssh/known_hosts:87 debug3: send packet: type 21 debug2: ssh_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: ssh_set_newkeys: mode 0 debug1: rekey in after 134217728 blocks debug1: Will attempt key: /home/fellipec/.ssh/id_rsa RSA SHA256:P7I0TPfumUFWub5hfye0OvAFjyFcHN1beiNa44qbL7k debug1: Will attempt key: /home/fellipec/.ssh/id_ecdsa debug1: Will attempt key: /home/fellipec/.ssh/id_ecdsa_sk debug1: Will attempt key: /home/fellipec/.ssh/id_ed25519 debug1: Will attempt key: /home/fellipec/.ssh/id_ed25519_sk debug1: Will attempt key: /home/fellipec/.ssh/id_xmss debug1: Will attempt key: /home/fellipec/.ssh/id_dsa 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= 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: Offering public key: /home/fellipec/.ssh/id_rsa RSA SHA256:P7I0TPfumUFWub5hfye0OvAFjyFcHN1beiNa44qbL7k debug3: send packet: type 50 debug2: we sent a publickey packet, wait for reply debug3: receive packet: type 60 debug1: Server accepts key: /home/fellipec/.ssh/id_rsa RSA SHA256:P7I0TPfumUFWub5hfye0OvAFjyFcHN1beiNa44qbL7k debug3: sign_and_send_pubkey: using publickey with RSA SHA256:P7I0TPfumUFWub5hfye0OvAFjyFcHN1beiNa44qbL7k debug3: sign_and_send_pubkey: signing using rsa-sha2-512 SHA256:P7I0TPfumUFWub5hfye0OvAFjyFcHN1beiNa44qbL7k debug3: send packet: type 50 debug3: receive packet: type 52 Authenticated to dolores.vpn ([10.6.158.11]:22) using "publickey". debug1: channel 0: new session [client-session] (inactive timeout: 0) debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug3: send packet: type 90 debug1: Requesting [url=mailto:no-more-sessions@openssh.com]no-more-sessions@openssh.com[/url] debug3: send packet: type 80 debug1: Entering interactive session. debug1: pledge: filesystem debug3: client_repledge: enter debug3: receive packet: type 80 debug1: client_input_global_request: rtype [url=mailto:hostkeys-00@openssh.com]hostkeys-00@openssh.com[/url] want_reply 0 debug3: client_input_hostkeys: received RSA key SHA256:NBoe8gLXvZYuwTpez/ZXQYAbmFeFlYleLn121iED4W4 debug3: client_input_hostkeys: received ECDSA key SHA256:jrQHVTBHIKaQbId1XMuGqYJjUQ45qTrxgCNowTgNbt0 debug3: client_input_hostkeys: received ED25519 key SHA256:ERH13dv6ZPNwL7zaQgQsXrzZNfXHEqiIwIXHFfTyQYo debug1: client_input_hostkeys: searching /home/fellipec/.ssh/known_hosts for dolores.vpn / (none) debug3: hostkeys_foreach: reading file "/home/fellipec/.ssh/known_hosts" debug3: hostkeys_find: found ecdsa-sha2-nistp256 key under different name/addr at /home/fellipec/.ssh/known_hosts:29 debug3: hostkeys_find: found ecdsa-sha2-nistp256 key under different name/addr at /home/fellipec/.ssh/known_hosts:30 debug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/fellipec/.ssh/known_hosts:86 debug3: hostkeys_find: found ssh-ed25519 key at /home/fellipec/.ssh/known_hosts:87 debug1: client_input_hostkeys: searching /home/fellipec/.ssh/known_hosts2 for dolores.vpn / (none) debug1: client_input_hostkeys: hostkeys file /home/fellipec/.ssh/known_hosts2 does not exist debug3: client_input_hostkeys: 3 server keys: 2 new, 18446744073709551615 retained, 2 incomplete match. 0 to remove debug1: client_input_hostkeys: host key found matching a different name/address, skipping UserKnownHostsFile update debug3: client_repledge: enter debug3: receive packet: type 4 debug1: Remote: /home/pi/.ssh/authorized_keys:2: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding debug3: receive packet: type 4 debug1: Remote: /home/pi/.ssh/authorized_keys:2: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding debug3: receive packet: type 91 debug2: channel_input_open_confirmation: channel 0: callback start debug2: fd 3 setting TCP_NODELAY debug3: set_sock_tos: set socket 3 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 HOSTTYPE debug1: channel 0: setting env LANG = "en_US.UTF-8" debug2: channel 0: request env confirm 0 debug3: send packet: type 98 debug3: Ignored env PATH debug3: Ignored env TERM debug3: Ignored env XDG_RUNTIME_DIR debug3: Ignored env DISPLAY debug3: Ignored env WAYLAND_DISPLAY debug3: Ignored env PULSE_SERVER debug3: Ignored env WSL2_GUI_APPS_ENABLED debug3: Ignored env WSLENV debug3: Ignored env WT_SESSION debug3: Ignored env WT_PROFILE_ID debug3: Ignored env WSL_INTEROP debug3: Ignored env NAME debug3: Ignored env HOME debug3: Ignored env USER debug3: Ignored env LOGNAME debug3: Ignored env SHELL debug3: Ignored env WSL_DISTRO_NAME debug3: Ignored env SHLVL debug3: Ignored env PWD debug3: Ignored env OLDPWD debug3: Ignored env P9K_TTY debug3: Ignored env _P9K_TTY debug3: Ignored env ZSH debug3: Ignored env PAGER debug3: Ignored env LESS debug3: Ignored env LSCOLORS debug3: Ignored env LS_COLORS debug3: Ignored env P9K_SSH debug3: Ignored env _P9K_SSH_TTY debug3: Ignored env _ debug2: channel 0: request shell confirm 1 debug3: send packet: type 98 debug3: client_repledge: enter debug1: pledge: fork 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 Linux dolores 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sat Jul 29 11:22:02 2023 from 192.168.100.38 pi@dolores:~ $ ```

And here when it hangs. It stop on this line and sometimes recover after a minute or two and logs in, sometimes it stay there what looks like forever

❯ ssh -vvvv pi@dolores.lan OpenSSH_9.3p1 Debian-1, OpenSSL 3.0.9 30 May 2023 debug1: Reading configuration data /home/fellipec/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files debug1: /etc/ssh/ssh_config line 21: Applying options for * debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/fellipec/.ssh/known_hosts' debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/fellipec/.ssh/known_hosts2' debug2: resolving "dolores.lan" port 22 debug3: resolve_host: lookup dolores.lan:22 debug3: ssh_connect_direct: entering debug1: Connecting to dolores.lan [192.168.100.40] port 22. debug3: set_sock_tos: set socket 3 IP_TOS 0x10 debug1: Connection established. debug1: identity file /home/fellipec/.ssh/id_rsa type 0 debug1: identity file /home/fellipec/.ssh/id_rsa-cert type -1 debug1: identity file /home/fellipec/.ssh/id_ecdsa type -1 debug1: identity file /home/fellipec/.ssh/id_ecdsa-cert type -1 debug1: identity file /home/fellipec/.ssh/id_ecdsa_sk type -1 debug1: identity file /home/fellipec/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /home/fellipec/.ssh/id_ed25519 type -1 debug1: identity file /home/fellipec/.ssh/id_ed25519-cert type -1 debug1: identity file /home/fellipec/.ssh/id_ed25519_sk type -1 debug1: identity file /home/fellipec/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /home/fellipec/.ssh/id_xmss type -1 debug1: identity file /home/fellipec/.ssh/id_xmss-cert type -1 debug1: identity file /home/fellipec/.ssh/id_dsa type -1 debug1: identity file /home/fellipec/.ssh/id_dsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_9.3p1 Debian-1 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.4p1 Debian-5+deb11u1 debug1: compat_banner: match: OpenSSH_8.4p1 Debian-5+deb11u1 pat OpenSSH* compat 0x04000000 debug2: fd 3 setting O_NONBLOCK debug1: Authenticating to dolores.lan:22 as 'pi' debug3: record_hostkey: found key type ECDSA in file /home/fellipec/.ssh/known_hosts:30 debug3: load_hostkeys_file: loaded 1 keys from dolores.lan debug1: load_hostkeys: fopen /home/fellipec/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp256 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: sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,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,ext-info-c debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp256,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256 debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: compression ctos: none,zlib@openssh.com,zlib debug2: compression stoc: none,zlib@openssh.com,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,curve25519-sha256@libssh.org,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 debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: compression ctos: none,zlib@openssh.com debug2: compression stoc: none,zlib@openssh.com 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: chacha20-poly1305@openssh.com MAC: compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none debug3: send packet: type 30 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug3: receive packet: type 31 debug1: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ecdsa-sha2-nistp256 SHA256:jrQHVTBHIKaQbId1XMuGqYJjUQ45qTrxgCNowTgNbt0 debug3: record_hostkey: found key type ECDSA in file /home/fellipec/.ssh/known_hosts:30 debug3: load_hostkeys_file: loaded 1 keys from dolores.lan debug1: load_hostkeys: fopen /home/fellipec/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: Host 'dolores.lan' is known and matches the ECDSA host key. debug1: Found key in /home/fellipec/.ssh/known_hosts:30 debug3: send packet: type 21 debug2: ssh_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: ssh_set_newkeys: mode 0 debug1: rekey in after 134217728 blocks debug1: Will attempt key: /home/fellipec/.ssh/id_rsa RSA SHA256:P7I0TPfumUFWub5hfye0OvAFjyFcHN1beiNa44qbL7k debug1: Will attempt key: /home/fellipec/.ssh/id_ecdsa debug1: Will attempt key: /home/fellipec/.ssh/id_ecdsa_sk debug1: Will attempt key: /home/fellipec/.ssh/id_ed25519 debug1: Will attempt key: /home/fellipec/.ssh/id_ed25519_sk debug1: Will attempt key: /home/fellipec/.ssh/id_xmss debug1: Will attempt key: /home/fellipec/.ssh/id_dsa 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= 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: Offering public key: /home/fellipec/.ssh/id_rsa RSA SHA256:P7I0TPfumUFWub5hfye0OvAFjyFcHN1beiNa44qbL7k debug3: send packet: type 50 debug2: we sent a publickey packet, wait for reply debug3: receive packet: type 60 debug1: Server accepts key: /home/fellipec/.ssh/id_rsa RSA SHA256:P7I0TPfumUFWub5hfye0OvAFjyFcHN1beiNa44qbL7k debug3: sign_and_send_pubkey: using publickey with RSA SHA256:P7I0TPfumUFWub5hfye0OvAFjyFcHN1beiNa44qbL7k debug3: sign_and_send_pubkey: signing using rsa-sha2-512 SHA256:P7I0TPfumUFWub5hfye0OvAFjyFcHN1beiNa44qbL7k debug3: send packet: type 50 debug3: receive packet: type 52 Authenticated to dolores.lan ([192.168.100.40]:22) using "publickey". debug1: channel 0: new session [client-session] (inactive timeout: 0) debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug3: send packet: type 90 debug1: Requesting no-more-sessions@openssh.com debug3: send packet: type 80 debug1: Entering interactive session. debug1: pledge: filesystem debug3: client_repledge: enter debug3: receive packet: type 80 debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0 debug3: client_input_hostkeys: received RSA key SHA256:NBoe8gLXvZYuwTpez/ZXQYAbmFeFlYleLn121iED4W4 debug3: client_input_hostkeys: received ECDSA key SHA256:jrQHVTBHIKaQbId1XMuGqYJjUQ45qTrxgCNowTgNbt0 debug3: client_input_hostkeys: received ED25519 key SHA256:ERH13dv6ZPNwL7zaQgQsXrzZNfXHEqiIwIXHFfTyQYo debug1: client_input_hostkeys: searching /home/fellipec/.ssh/known_hosts for dolores.lan / (none) debug3: hostkeys_foreach: reading file "/home/fellipec/.ssh/known_hosts" debug3: hostkeys_find: found ecdsa-sha2-nistp256 key under different name/addr at /home/fellipec/.ssh/known_hosts:29 debug3: hostkeys_find: found ecdsa-sha2-nistp256 key at /home/fellipec/.ssh/known_hosts:30 debug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/fellipec/.ssh/known_hosts:86 debug3: hostkeys_find: found ssh-ed25519 key under different name/addr at /home/fellipec/.ssh/known_hosts:87 debug1: client_input_hostkeys: searching /home/fellipec/.ssh/known_hosts2 for dolores.lan / (none) debug1: client_input_hostkeys: hostkeys file /home/fellipec/.ssh/known_hosts2 does not exist debug3: client_input_hostkeys: 3 server keys: 2 new, 18446744073709551615 retained, 2 incomplete match. 0 to remove debug1: client_input_hostkeys: host key found matching a different name/address, skipping UserKnownHostsFile update debug3: client_repledge: enter debug3: receive packet: type 4 debug1: Remote: /home/pi/.ssh/authorized_keys:2: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding debug3: receive packet: type 4 debug1: Remote: /home/pi/.ssh/authorized_keys:2: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding debug3: receive packet: type 91 debug2: channel_input_open_confirmation: channel 0: callback start debug2: fd 3 setting TCP_NODELAY debug3: set_sock_tos: set socket 3 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 HOSTTYPE debug1: channel 0: setting env LANG = "en_US.UTF-8" debug2: channel 0: request env confirm 0 debug3: send packet: type 98 debug3: Ignored env PATH debug3: Ignored env TERM debug3: Ignored env XDG_RUNTIME_DIR debug3: Ignored env DISPLAY debug3: Ignored env WAYLAND_DISPLAY debug3: Ignored env PULSE_SERVER debug3: Ignored env WSL2_GUI_APPS_ENABLED debug3: Ignored env WSLENV debug3: Ignored env WT_SESSION debug3: Ignored env WT_PROFILE_ID debug3: Ignored env WSL_INTEROP debug3: Ignored env NAME debug3: Ignored env HOME debug3: Ignored env USER debug3: Ignored env LOGNAME debug3: Ignored env SHELL debug3: Ignored env WSL_DISTRO_NAME debug3: Ignored env SHLVL debug3: Ignored env PWD debug3: Ignored env OLDPWD debug3: Ignored env P9K_TTY debug3: Ignored env _P9K_TTY debug3: Ignored env ZSH debug3: Ignored env PAGER debug3: Ignored env LESS debug3: Ignored env LSCOLORS debug3: Ignored env LS_COLORS debug3: Ignored env P9K_SSH debug3: Ignored env _P9K_SSH_TTY debug3: Ignored env _ debug2: channel 0: request shell confirm 1 debug3: send packet: type 98 debug3: client_repledge: enter debug1: pledge: fork debug2: channel_input_open_confirmation: channel 0: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768

The dmesg didn't show any errors or warnings

Anyone have any idea of what may cause this problem?

EDIT: Used tshark to monitor the network connection, and seens some problem happening too.

TSecr=3245878158 35 15.889326253 192.168.100.40 → 192.168.100.38 SSHv2 250 Server: Encrypted packet (len=184) 36 15.896076666 192.168.100.38 → 192.168.100.40 TCP 66 51900 → 22 [ACK] Seq=3593 Ack=3317 Win=64384 Len=0 TSval=2904236598 TSecr=3245878222 37 15.898404355 192.168.100.38 → 192.168.100.40 SSHv2 526 Client: Encrypted packet (len=460) 38 15.898442531 192.168.100.40 → 192.168.100.38 TCP 66 22 → 51900 [ACK] Seq=3317 Ack=4053 Win=64128 Len=0 TSval=3245878231 TSecr=2904236599 39 15.903995038 192.168.100.40 → 192.168.100.38 SSHv2 174 Server: Encrypted packet (len=108) 40 15.904801489 192.168.100.40 → 192.168.100.38 SSHv2 262 Server: Encrypted packet (len=196) 41 15.904972738 192.168.100.40 → 192.168.100.38 SSHv2 222 Server: Encrypted packet (len=156) 42 15.905034039 192.168.100.40 → 192.168.100.38 SSHv2 286 Server: Encrypted packet (len=220) 43 15.911897524 192.168.100.38 → 192.168.100.40 TCP 78 [TCP Dup ACK 36#1] 51900 → 22 [ACK] Seq=4053 Ack=3317 Win=64384 Len=0 TSval=2904236612 TSecr=3245878231 SLE=3425 SRE=3621 44 15.912032471 192.168.100.40 → 192.168.100.38 TCP 174 [TCP Out-Of-Order] 22 → 51900 [PSH, ACK] Seq=3317 Ack=4053 Win=64128 Len=108 TSval=3245878244 TSecr=2904236612 45 16.138099711 192.168.100.40 → 192.168.100.38 TCP 174 [TCP Retransmission] 22 → 51900 [PSH, ACK] Seq=3317 Ack=4053 Win=64128 Len=108 TSval=3245878471 TSecr=2904236612 46 16.618074324 192.168.100.40 → 192.168.100.38 TCP 174 [TCP Retransmission] 22 → 51900 [PSH, ACK] Seq=3317 Ack=4053 Win=64128 Len=108 TSval=3245878951 TSecr=2904236612 47 17.546070222 192.168.100.40 → 192.168.100.38 TCP 174 [TCP Retransmission] 22 → 51900 [PSH, ACK] Seq=3317 Ack=4053 Win=64128 Len=108 TSval=3245879879 TSecr=2904236612 48 19.370074315 192.168.100.40 → 192.168.100.38 TCP 174 [TCP Retransmission] 22 → 51900 [PSH, ACK] Seq=3317 Ack=4053 Win=64128 Len=108 TSval=3245881703 TSecr=2904236612 49 23.018116354 192.168.100.40 → 192.168.100.38 TCP 174 [TCP Retransmission] 22 → 51900 [PSH, ACK] Seq=3317 Ack=4053 Win=64128 Len=108 TSval=3245885351 TSecr=2904236612 50 26.602229808 192.168.100.40 → 192.168.100.31 SSH 786 Server: Encrypted packet (len=720) 51 30.442143329 192.168.100.40 → 192.168.100.38 TCP 174 [TCP Retransmission] 22 → 51900 [PSH, ACK] Seq=3317 Ack=4053 Win=64128 Len=108 TSval=3245892775 TSecr=2904236612 52 30.816252362 192.168.100.38 → 192.168.100.40 SSHv2 146 Client: Encrypted packet (len=68) 53 30.858110036 192.168.100.40 → 192.168.100.38 TCP 66 22 → 51900 [ACK] Seq=3997 Ack=4121 Win=64128 Len=0 TSval=3245893191 TSecr=2904251518 54 31.050784740 192.168.100.38 → 192.168.100.40 SSHv2 146 Client: [TCP Spurious Retransmission] , Encrypted packet (len=68) 55 31.050884687 192.168.100.40 → 192.168.100.38 TCP 78 [TCP Dup ACK 53#1] 22 → 51900 [ACK] Seq=3997 Ack=4121 Win=64128 Len=0 TSval=3245893383 TSecr=2904251748 SLE=4053 SRE=4121 56 31.289736092 192.168.100.38 → 192.168.100.40 SSHv2 146 Client: [TCP Spurious Retransmission] , Encrypted packet (len=68) 57 31.289892497 192.168.100.40 → 192.168.100.38 TCP 78 [TCP Dup ACK 53#2] 22 → 51900 [ACK] Seq=3997 Ack=4121 Win=64128 Len=0 TSval=3245893622 TSecr=2904251988 SLE=4053 SRE=4121 58 31.757269350 192.168.100.38 → 192.168.100.40 SSHv2 146 Client: [TCP Spurious Retransmission] , Encrypted packet (len=68) 59 31.757419141 192.168.100.40 → 192.168.100.38 TCP 78 [TCP Dup ACK 53#3] 22 → 51900 [ACK] Seq=3997 Ack=4121 Win=64128 Len=0 TSval=3245894090 TSecr=2904252458 SLE=4053 SRE=4121 60 32.719793660 192.168.100.38 → 192.168.100.40 SSHv2 146 Client: [TCP Spurious Retransmission] , Encrypted packet (len=68) 61 32.719957825 192.168.100.40 → 192.168.100.38 TCP 78 [TCP Dup ACK 53#4] 22 → 51900 [ACK] Seq=3997 Ack=4121 Win=64128 Len=0 TSval=3245895052 TSecr=2904253418 SLE=4053 SRE=4121 62 34.639797425 192.168.100.38 → 192.168.100.40 SSHv2 146 Client: [TCP Spurious Retransmission] , Encrypted packet (len=68) 63 34.639971486 192.168.100.40 → 192.168.100.38 TCP 78 [TCP Dup ACK 53#5] 22 → 51900 [ACK] Seq=3997 Ack=4121 Win=64128 Len=0 TSval=3245896972 TSecr=2904255338 SLE=4053 SRE=4121
submitted by /u/fellipec
[link] [comments]

Source: https://www.reddit.com/r/raspberry_pi/c ... over_wifi/
/RaspberryPi
Post Reply

Return to “Raspberry Pi Forum”