PowerShell / PowerShell/Win32-OpenSSH
OpenSSH_7.6p1, LibreSSL 2.5.3 does not support ED25519
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
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 root@10.217.57.35 -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: ssh-ed25519-cert-v01@openssh.com,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: curve25519-sha256@libssh.org,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: ssh-ed25519-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,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,curve25519-sha256@libssh.org,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: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com,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@libssh.org
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: aes128-ctr MAC: umac-128-etm@openssh.com compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: umac-128-etm@openssh.com 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 root@10.217.57.35 -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,curve25519-sha256@libssh.org,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: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,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,curve25519-sha256@libssh.org,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: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com,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: umac-128-etm@openssh.com compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: umac-128-etm@openssh.com 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Windows ssh ... -vvvv command and compare its negotiation and authentication output with the working WSL SSH session shown in the issue. Reproduce the connection using the reported OpenSSH 7.6p1 client and server details; done means the Windows client can connect using the ED25519-related setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, powershell, ubuntu
- Domain
- networking, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100