Repository navigation
Closed
Description
- Your Windows build number: (Type
verat a Windows Command Prompt)
19624
- What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
At local WSL2 Ubuntu 20.04 LTS instance
# camber @ Camber-Laptop in ~ [15:49:22]
$ ssh -vvv [email protected]
OpenSSH_8.2p1 Ubuntu-4, OpenSSL 1.1.1f 31 Mar 2020
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: resolving "hikari.camber.moe" port 22
debug2: ssh_connect_direct
debug1: Connecting to hikari.camber.moe [101.132.134.54] port 22.
debug1: Connection established.
debug1: identity file /home/camber/.ssh/id_rsa type 0
debug1: identity file /home/camber/.ssh/id_rsa-cert type -1
debug1: identity file /home/camber/.ssh/id_dsa type -1
debug1: identity file /home/camber/.ssh/id_dsa-cert type -1
debug1: identity file /home/camber/.ssh/id_ecdsa type -1
debug1: identity file /home/camber/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/camber/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/camber/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/camber/.ssh/id_ed25519 type -1
debug1: identity file /home/camber/.ssh/id_ed25519-cert type -1
debug1: identity file /home/camber/.ssh/id_ed25519_sk type -1
debug1: identity file /home/camber/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/camber/.ssh/id_xmss type -1
debug1: identity file /home/camber/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4
debug1: match: OpenSSH_8.2p1 Ubuntu-4 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to hikari.camber.moe:22 as 'root'
debug3: hostkeys_foreach: reading file "/home/camber/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/camber/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys from hikari.camber.moe
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
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: curve25519-sha256,[email protected],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: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,[email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],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,[email protected],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: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
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: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Connection closed by 101.132.134.54 port 22
At remote Ubuntu 20.04 LTS (journalctl -e --unit=ssh.service)
sshd[7477]: error: kex_input_kexinit: discard proposal: string is too large [preauth]
sshd[7477]: ssh_dispatch_run_fatal: Connection from [MyIP] port 27510: string is too large [preauth]
- What's wrong / what should be happening instead:
Referring to #4208 , which is closed for a long time:
in wsl2 when I use ssh to login a remote server, the connection closed immediately
I encountered the exactly same issue.
It's weird because I don't have the issue on my other WSL2 instance, like debian, and neither does my friend's. As the previous issue is closed for a long time, and even i got my workaround, I think I should open this new issue with some detailed information to figure what's wrong.
- Strace of the failing command, if applicable: (If
some_commandis failing, then runstrace -o some_command.strace -f some_command some_args, and link the contents ofsome_command.stracein a gist here).
I tried, but by running See #5244 (comment)strace -o ssh.strace -f ssh -vvv [email protected] it works without any errors, which is so weird.
Activity
sixbitproxywax commentedon May 28, 2020
Just to add another data point, ssh works for:
At least in my particular case.
I also attempted to do a distribution upgrade from 18.04 to 20.04 using WSL2, and this also failed to work.
sixbitproxywax commentedon May 28, 2020
And since Camber Huang (@CamberLoid) couldn't get a trace, perhaps mine will work as a substitute (our debug output seems similar enough to assume we might be having the same issue):
Here's the gist
danztensai commentedon Jun 12, 2020
for my case it wont work on ubuntu 18.04(WSL 1 & 2) even Ubuntu 20.04(WSL 1& 2). cant do any SSH connection,
rescenic commentedon Jun 13, 2020
https://github.com/rescenic/autossh
sixbitproxywax commentedon Jun 16, 2020
I don't believe this actually addresses the problem. If it does, could you explain how?
rescenic commentedon Jun 16, 2020
It's not WSL fault.
SSH works, if 'dmesg' error doesn't appear at the startup (it means in normal startup).
See your logs: debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Try this solution from ServerFault:
https://serverfault.com/questions/210408/cannot-ssh-debug1-expecting-ssh2-msg-kex-dh-gex-reply
https://www.seei.biz/ssh-fails-to-connect-with-debug1-expecting-ssh2_msg_kex_ecdh_reply/
Ubuntu SSH to Windows:



CamberLoid commentedon Jun 18, 2020
The two address have pointed a possible point.
But I have tried before creating the issue and found it not working, meaning setting MTU might not be a solution.
rescenic commentedon Jun 18, 2020
Try this: https://superuser.com/questions/699530/git-pull-does-nothing-git-push-just-hangs-debug1-expecting-ssh2-msg-kex-ecd
From RHEL:
danztensai commentedon Jun 30, 2020
Hi there I fix this problem by updating my wifi driver , it seems wsl 2 kinda have problem with old driver
I'm using killer Wifi , try to update your wifi driver guys
based on this link
#4253
kevin820606 commentedon Aug 21, 2020
I stuck on this problem for weeks, and your suggest is totally work! Thanks!
therealkenc commentedon Sep 6, 2020
Please collect WSL logs and post the backlink to the feedback item here. Also please identify any third-party networking software that has been installed on Windows.
CamberLoid commentedon Sep 26, 2020
Sorry guys, Camber's here.
I'm feeling appreciated to hear responses from collaborator and same issue from other guys. However my previous device (Xiaomi Mi Gaming Laptop 2018) was broken and not able to use.
As it is out of warranty I'm planning to switch to ROG Zephyrus G15. So that I'm afraid I cannot reproduce anymore.
I will leave the issue open to see if any other fellows can help reproduce and upload the logs. Anyone helping this out will be much appreciated.
Stay safe. Camber out.
therealkenc commentedon Sep 26, 2020
Thanks for the follow-up Chamber, it is very appreciated. Let's call this spiritually /dupe #4253. Some drivers do not seem to handle mismatched MTUs well. Or, at least that is a plausible working theory.
Anyone still seeing the OP fail "
error: kex_input_kexinit: discard proposal: string is too large [preauth]" please submit a new issue following the template, including WSL logs.