Description
Troubleshooting steps
Tested using multiple SSH keys sizes.
Tested using different terminals, CMD and PowerShell 5.1
Tested using WSL Ubuntu "16.04.6 LTS"
Terminal issue? please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH
Please answer the following
"OpenSSH for Windows" version
((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
7.7.2.2
Server OperatingSystem
PKIX-SSH 10.0, OpenSSH_7.4p1, OpenSSL 1.0.2p-fips 14 Aug 2018
Unknown Linux variant.
Avocent ACS8000
Bootcode: | 1.18
Firmware: | 2.6.1.4324+858+37+11 (Apr 9 2019 - 17:12:59)
Booted From: | Hardware
Client OperatingSystem
[System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 18362 0
What is failing
SSH connection is closed when connecting to when a curve25519-sha256 key is used.
Expected output
From the WSL instance of SSH using the same key.
Testing using CMD, and PowerShell terminals. Both showed the same result. Only when I entered into WSL and made the same command the session connected.'
See the updated session in the thread below.
emarq@emarqdesktop:/mnt/c/Users/emarq.REDMOND/.ssh$ ssh [email protected] -p 8001 -i ./id_rsa -vvvv
OpenSSH_7.2p2 Ubuntu-4ubuntu2.8, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "10.217.57.35" port 8001
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 10.217.57.35 [10.217.57.35] port 8001.
debug1: Connection established.
debug1: identity file ./id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file ./id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4 PKIX[10.0]
debug1: match: OpenSSH_7.4 PKIX[10.0] pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 10.217.57.35:8001 as 'root'
debug3: put_host_port: [10.217.57.35]:8001
debug3: hostkeys_foreach: reading file "/home/emarq/.ssh/known_hosts"
debug3: record_hostkey: found key type ED25519 in file /home/emarq/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys from [10.217.57.35]:8001
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],ssh-ed25519
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: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],ssh-ed25519,[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc
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,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa,ssh-dss,ssh-rsa,ssh-ed25519
debug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: [email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: aes128-ctr MAC: [email protected] compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: [email protected] compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ssh-ed25519 SHA256:ity+sXnXuNuM+3MmN3vk8JKJa058bwG2d/MQ4LSMhIE
debug3: put_host_port: [10.217.57.35]:8001
debug3: put_host_port: [10.217.57.35]:8001
debug3: hostkeys_foreach: reading file "/home/emarq/.ssh/known_hosts"
debug3: record_hostkey: found key type ED25519 in file /home/emarq/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys from [10.217.57.35]:8001
debug3: hostkeys_foreach: reading file "/home/emarq/.ssh/known_hosts"
debug3: record_hostkey: found key type ED25519 in file /home/emarq/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys from [10.217.57.35]:8001
debug1: Host '[10.217.57.35]:8001' is known and matches the ED25519 host key.
debug1: Found key in /home/emarq/.ssh/known_hosts:2
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 4294967296 blocks
debug2: key: ./id_rsa (0x7fffc98d7db0), explicit
debug3: send packet: type 5
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive
debug3: start over, passed a different list publickey,keyboard-interactive
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: ./id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug3: send packet: type 50
debug2: we sent a keyboard-interactive packet, wait for reply
debug3: receive packet: type 60
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
debug3: send packet: type 61
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: userauth_kbdint
debug3: send packet: type 50
debug2: we sent a keyboard-interactive packet, wait for reply
debug3: receive packet: type 60
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
Actual output
C:\Users\emarq.REDMOND\.ssh>ssh [email protected] -p 8001 -i ./id_rsa -vvvv
OpenSSH_7.6p1, LibreSSL 2.5.3
debug3: Failed to open file:C:\\Users\\emarq.REDMOND/.ssh/config error:2
debug3: Failed to open file:./ssh_config error:2
debug2: resolving "10.217.57.35" port 8001
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 10.217.57.35 [10.217.57.35] port 8001.
debug1: Connection established.
debug1: identity file ./id_rsa type 0
debug3: Failed to open file:./id_rsa-cert error:2
debug3: Failed to open file:./id_rsa-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file ./id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4 PKIX[10.0]
debug1: match: OpenSSH_7.4 PKIX[10.0] pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 10.217.57.35:8001 as 'root'
debug3: put_host_port: [10.217.57.35]:8001
debug3: hostkeys_foreach: reading file "C:\\Users\\emarq.REDMOND/.ssh/known_hosts"
debug3: Failed to open file:C:\\Users\\emarq.REDMOND/.ssh/known_hosts2 error:2
debug3: Failed to open file:./ssh_known_hosts error:2
debug3: Failed to open file:./ssh_known_hosts2 error:2
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-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr
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
debug2: compression stoc: none
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,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa,ssh-dss,ssh-rsa,ssh-ed25519
debug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: [email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: aes128-ctr MAC: [email protected] compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: [email protected] compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ssh-ed25519 SHA256:ity+sXnXuNuM+3MmN3vk8JKJa058bwG2d/MQ4LSMhIE
debug3: put_host_port: [10.217.57.35]:8001
debug3: put_host_port: [10.217.57.35]:8001
debug3: hostkeys_foreach: reading file "C:\\Users\\emarq.REDMOND/.ssh/known_hosts"
debug3: Failed to open file:C:\\Users\\emarq.REDMOND/.ssh/known_hosts2 error:2
debug3: Failed to open file:./ssh_known_hosts error:2
debug3: Failed to open file:./ssh_known_hosts2 error:2
debug3: hostkeys_foreach: reading file "C:\\Users\\emarq.REDMOND/.ssh/known_hosts"
debug3: Failed to open file:C:\\Users\\emarq.REDMOND/.ssh/known_hosts2 error:2
debug3: Failed to open file:./ssh_known_hosts error:2
debug3: Failed to open file:./ssh_known_hosts2 error:2
debug1: checking without port identifier
debug3: hostkeys_foreach: reading file "C:\\Users\\emarq.REDMOND/.ssh/known_hosts"
debug3: record_hostkey: found key type ED25519 in file C:\\Users\\emarq.REDMOND/.ssh/known_hosts:8
debug3: load_hostkeys: loaded 1 keys from 10.217.57.35
debug3: Failed to open file:C:\\Users\\emarq.REDMOND/.ssh/known_hosts2 error:2
debug3: Failed to open file:./ssh_known_hosts error:2
debug3: Failed to open file:./ssh_known_hosts2 error:2
debug1: Host '10.217.57.35' is known and matches the ED25519 host key.
debug1: Found key in C:\\Users\\emarq.REDMOND/.ssh/known_hosts:8
debug1: found matching key w/out port
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 4294967296 blocks
debug2: key: ./id_rsa (0000027F68938AD0), explicit, agent
debug2: key: .\\emarq_rsa (0000027F689395C0), agent
debug3: send packet: type 5
Connection closed by 10.217.57.35 port 8001