Skip to content
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

SSH no longer working (hangs) #12226

Closed
1 of 2 tasks
seancorfield opened this issue Oct 31, 2024 · 12 comments
Closed
1 of 2 tasks

SSH no longer working (hangs) #12226

seancorfield opened this issue Oct 31, 2024 · 12 comments
Labels
emailed-logs Logs have been emailed

Comments

@seancorfield
Copy link

Windows Version

Microsoft Windows [Version 10.0.26120.2200]

WSL Version

2.3.25.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu 20.04

Other Software

PS C:\Users\seanc> wsl --version
WSL version: 2.3.25.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26120.2200

Repro Steps

Running ssh [email protected] hangs. It was working fine last week.

ssh works in Powershell. ssh with the same user/ip hangs on Ubuntu 20.04 and Oracle 8.8 on multiple machines.

Expected Behavior

ssh should connect on WSL2 distros, just like it does on Powershell (and like it used to just last week).

Actual Behavior

ssh on WSL2 hangs. ssh on Powershell connects just fine.

Diagnostic Logs

Happy to provide any/all diagnostic logging if you can let me know how to get the information.

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@seancorfield
Copy link
Author

ssh -vvv output (IP changed to protect server identity:

> ssh -vvv [email protected]
OpenSSH_8.2p1 Ubuntu-4ubuntu0.11, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /home/sean/.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 *
debug2: resolve_canonicalize: hostname 10.8.234.56 is address
debug2: ssh_connect_direct
debug1: Connecting to 10.8.234.56 [10.8.234.56] port 22.

@seancorfield
Copy link
Author

/emailed-logs

Copy link

Diagnostic information
Found '/emailed-logs', adding tag 'emailed-logs'

@github-actions github-actions bot added the emailed-logs Logs have been emailed label Oct 31, 2024
@seancorfield
Copy link
Author

Gmail won't let me send you the .zip file. I don't want to attach it here.

@seancorfield
Copy link
Author

I sent it from a different email account. Hopefully, it gets through.

@elsaco
Copy link

elsaco commented Oct 31, 2024

It was working fine last week does this mean it was working in wsl-2.3.24? Looks like you upgraded to wsl-2.3.25 already and this version was released last week.

There's only one entry in the changelog of 2.3.25:

Automatically fall back to virtioProxy networking mode if NAT networking mode fails

Are you using mirrored or nat mode?

Using a newer version of ssh it didn't repro on my setup:

elsaco@miami:~$ ssh -vvv [email protected]
OpenSSH_9.2p1 Debian-2+deb12u3, OpenSSL 3.0.14 4 Jun 2024
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 *
debug2: resolve_canonicalize: hostname 192.168.1.198 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/elsaco/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/elsaco/.ssh/known_hosts2'
debug3: ssh_connect_direct: entering
debug1: Connecting to 192.168.1.198 [192.168.1.198] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x10
debug1: Connection established.
---cut---

Some WSL info:

elsaco@miami:~$ wslinfo --wsl-version
2.3.25
elsaco@miami:~$ wslinfo --networking-mode
nat

@seancorfield
Copy link
Author

Thu Oct 31 14:41:38
(~)-(!2001)-> wslinfo --wsl-version
2.3.25

Thu Oct 31 14:41:40
(~)-(!2002)-> wslinfo --networking-mode
nat

I guess it's probably time to move to a more recent distro than Ubuntu 20.04 at this point...?

@seancorfield
Copy link
Author

I tried it on Ubuntu 24 with a more recent OpenSSH and it still hangs:

OpenSSH_9.6p1 Ubuntu-3ubuntu13.5, OpenSSL 3.0.13 30 Jan 2024

@seancorfield
Copy link
Author

does this mean it was working in wsl-2.3.24?

Yes. (sorry I didn't answer that earlier)

@seancorfield
Copy link
Author

I switched to mirrored networking, rebooted and retried. After a pause (at the debug1: Connecting to 10.8.234.56 [10.8.234.56] port 22. line), it failed with No route to host.

Is there any way to "downgrade" WSL to 2.3.24 to that version?

@seancorfield
Copy link
Author

I see 2.3.26 was released. ssh is still broken for me in that new version too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emailed-logs Logs have been emailed
Projects
None yet
Development

No branches or pull requests

2 participants