WSL: SSH hangs after machine powered on sometimes.

  • Your Windows build number: (Type ver at a Windows Command Prompt) Microsoft Windows [Version 10.0.17728.1000]

  • What you’re doing and what’s happening: (Copy&paste specific commands and their output, or include screen shots) Powered off my Surface Book 2, and power on. SSH on WSL(ubuntu) doesn’t work. It hangs there, can’t do Ctrl + C. However, ssh on windows cmd is successful. And this never happened to me in previous builds. Besides, after rebooting (instead of powering off), things went back to normal. Verbose log is as below:

OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /home/michaelht/.ssh/config
debug1: /home/michaelht/.ssh/config line 12: Applying options for erda
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to HOSTNAME [HOSTIP] port 22.
debug1: Connection established.
debug1: identity file /home/michaelht/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michaelht/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michaelht/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michaelht/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michaelht/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michaelht/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michaelht/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michaelht/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4
debug1: match: OpenSSH_7.6p1 Ubuntu-4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to HOSTNAME:22 as 'michaelht'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:ERZ2W+O9hyjot+mU8FUAAqzSvbgxizdF5hL6BnpdIOI
debug1: Host 'HOSTNAME' is known and matches the ECDSA host key.
debug1: Found key in /home/michaelht/.ssh/known_hosts:24
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
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>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/michaelht/.ssh/id_rsa
debug1: Server accepts key: pkalg rsa-sha2-512 blen 535
debug1: Authentication succeeded (publickey).
Authenticated to HOSTNAME ([HOSTIP]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Requesting authentication agent forwarding.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_CTYPE = en_US.UTF-8

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 44 (9 by maintainers)

Most upvoted comments

While the fix is coming to overcome this run per @whereisaaron comment. It shows up for me after my computer has been on for about a week or so.

sc stop LxssManager
sc start LxssManager

I get this stuck ssh connections situation every now and them with since Win10 1803. Any attempt to connect with ssh just hangs forever. I restart the ‘LxssManager’ service and that fixes it for me.

It’s an issue in our driver, working on a fix now.

Ah yes, I had updated to 17134 and just had the issue. Rebooting to update to 17751.

@ethanhs - Yeah unfortunately the fix is not in skip ahead yet, but will be very soon.

@benhillis Okay, I just turned off fast startup and powered off and on, things are good.

So probably new builds messed something up for fast startup?