Open andyli opened 2 years ago
@andyli quick test: comment out ssh command in wsl.conf and start the server in debug mode with sudo /usr/sbin/sshd -ddd
then connect from another terminal. This will show what's going on when the client exits. Please post ssh debug output.
I just did sudo /usr/sbin/sshd -ddd
, ssh client connected and exited, somehow the sshd process also exited when the client exit.
The log is at https://gist.github.com/andyli/60b5832cf37862c3d133e96cc56008aa
Note that I had to do a sudo mkdir -p /var/run/sshd
before starting sshd, or else there is an error Missing privilege separation directory: /run/sshd
.
I'm having same issue where ubuntu prompt doesn't come when exiting from ssh console connection. Terminal stays stuck and I have to close the window and open a new one. Windows 10 21H2 WSL 2 Ubuntu 20.04
I have the same issue. I can ssh in but the process gets zombied on exit and the prompt never returns.
Windows 11 22H2 WSL 2 Ubuntu 20.04
Version
Microsoft Windows [Version 10.0.22598.200]
WSL Version
Kernel Version
Linux version 5.10.102.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Mar 2 00:30:59 UTC 2022
Distro Version
Ubuntu 20.04
Other Software
OpenSSH_8.2p1 Ubuntu-4ubuntu0.4, OpenSSL 1.1.1f 31 Mar 2020
Repro Steps
I use wsl.conf's [boot] command to start ssh server:
I could connect to the ssh server running in wsl successfully, but when I issue
exit
, the ssh client terminal become blank and did not return to prompt. If I close the terminal window and re-connect with ssh, there is a zombie process in wsl.Expected Behavior
ssh client should
exit
and return to prompt immediately without any zombie processes.Actual Behavior
ssh client terminal become blank and did not return to prompt. If I close the terminal window and re-connect with ssh, there is a zombie process in wsl.
A workaround is to add
sudo
in the wsl.conf boot commandSomehow with
sudo
, ssh clients were able toexit
and returned to prompt immediately.Diagnostic Logs
No response