-
Notifications
You must be signed in to change notification settings - Fork 744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"client_loop: send disconnect: Connection reset" on Windows 11 when Mobile Hotspot is enabled #1873
Comments
I am also seeing this issue, W11 and SSH from PS, but am not running a hotspot. SSH from PS, auth and maybe get 30s of interactive shell before it freezes and then I get disconnected. This also seems to only be occurring when SSHing to my raspberry pi. Not seeing this issue when SSHing to Ubuntu or Debian hosts. I've been able to work around this by SSHing from WSL. No connection drops there. |
@shellfyred Seems to be a bug in Windows 11 kernel |
It might be worth investigating (using |
I don't have much network knowledge to be able to do deeper investigations but I'm willing to help mitigate this problem, if you have a tip of what I can do to collect more information I'm available. I found that the problem is occurring even without the windows hostspot being enabled. |
I have the same problem on Windows 11. |
@insinfo - please provide the ssh client (ssh -vvv user@ip) and server side logs. |
debian 10 server config# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
SyslogFacility AUTH
#LogLevel INFO
LogLevel DEBUG3
# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#PubkeyAuthentication yes
# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
# override default of no subsystems
Subsystem sftp /usr/lib/openssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server debian 10 server log
windows 11 client
/var/log/auth.logscreenshot of the moment it crashed and I lost SSH access |
Same issue. I don't have mobile hotspot enabled. I don't think it is related. |
Did you get it solve? |
@insinfo - Looking at the logs, the connection is closed by 192.168.66.123. I don't see error on win32-openssh ssh.exe side. From Auth.log, |
@samarass , @moosicplexix , please provide the ssh client (ssh -vvv user@ip) and server side logs.. |
Try this solution below. I had the same issue and this worked for me: Solution copied from Unix Stack Exchange I solved the same problem by editing the file ~/.ssh/config to have: Host * Motivation: TCPKeepAlive no means "do not send keepalive messages to the server". When the opposite, TCPKeepAlive yes, is set, then the client sends keepalive messages to the server and requires a response in order to maintain its end of the connection. This will detect if the server goes down, reboots, etc. The trouble with this is that if the connection between the client and server is broken for a brief period of time (due to flaky a network connection), this will cause the keepalive messages to fail, and the client will end the connection with "broken pipe". Setting TCPKeepAlive no tells the client to just assume the connection is still good until proven otherwise by a user request, meaning that temporary connection breakages while your ssh term is sitting idle in the background won't kill the connection. |
Same issue, mobile hotspot disabled, ssh with powershell7. |
Ah, having this issue still and unfortunately the previous fix didn't work for me. Any ideas? |
+1 Same here Win11 |
+1 same issue Win11 |
+1 I have the same issue on Win11 ( powershell 7.6 ) |
This worked for me in W11. in C:\Users*username*.ssh folder create a "config" file without extension and paste the solution inside. Save and re-run ssh connection. Reminder: Don't use W11. |
I got this error after ssh into a remote PC, then calling |
+1 same issue Win11 |
no nothing work> I will try this solution and update my comment later. |
+1 same issue windows 11 |
+1 happens for me too, Windows 11 |
I have the same issue on Windows 11 when using ssh to connect to my Nvidia Orin running Jetpack. |
It works for me to |
+1 same issue, windows 10 (powershell 7) |
Same issue |
+1 |
There would be many possibilities for this situation. My problem was a connection reset when logging into multiple remote addresses with different tools that had in common the same win-openssh and shared a network, I first troubleshot the openssh issue. I logged into the remote address with ssh in Ubuntu in docker and found that connection reset also occurred, which could rule out a win-openssh issue. So I used wireshark to grab packets and found that when a connection reset occurs, the corresponding network adapter is unavailable, so I at least know that it's the network causing the problem. |
+1 Same issue. SSH connection: |
+1 Same issue, Windows 10 |
+1 |
+1 same issue, Windows 11 |
+1, W11 |
+1 |
+1 lol |
+1 |
1 similar comment
+1 |
I think that is the most plausible explanation, and explains my current scenario resulting in the same issue. It makes sense as well if you think about it, if it wouldn't be that way, it would make the connections vulnerable to an attack! |
I'm having this problem on Windows 11 when Mobile Hotspot is enabled, it seems there's a bug, when Mobile Hotspot is enabled, I keep losing the connection all the time intermittently, sometimes I can't even authenticate, sometimes it takes 30 to 50 seconds to lose connection. The connection remains open on the server.
It's impossible to work in the terminal via SSH, because the connection drops before you do anything.
"Write Failed: broken pipe" or "client_loop: send disconnect: Connection reset" on SSH connection.
No ping loss occurs
The text was updated successfully, but these errors were encountered: