Win32-OpenSSH icon indicating copy to clipboard operation
Win32-OpenSSH copied to clipboard

no-touch-required not working

Open ccy opened this issue 2 years ago • 8 comments
trafficstars

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest version
  • [X] Search the existing issues.

Steps to reproduce

Here is my environment

  • Yubikey 5 firmware is 5.4.3
  • SSH Client: Windows 11 - OpenSSH_for_Windows_9.2p1, LibreSSL 3.6.1
  • SSH server: Debian bullseye - OpenSSH_8.4p1 Debian-5+deb11u1, OpenSSL 1.1.1n

I create a new key in Windows 11:

ssh-keygen.exe -t ed25519-sk -O resident -O no-touch-required

I add the public key to ~/.ssh/authorized_keys:

no-touch-required [email protected] AAAAGnNrLXNzaC1lZDI1...Do=

When I try to establish a ssh session, I encounter error:

ssh [email protected]
sign_and_send_pubkey: signing failed for ED25519-SK "C:\\Users\\engineer/.ssh/id_ed25519_sk": requested feature not supported
[email protected]: Permission denied (publickey).

If I don't use -O no-touch-required when create key, the ssh session can start as usual.

Here is the full debug log:

OpenSSH_for_Windows_9.2p1, LibreSSL 3.6.1
debug1: Connecting to 192.168.0.194 [192.168.0.194] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\engineer/.ssh/id_rsa type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_ecdsa type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_ecdsa_sk type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_ed25519 type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_ed25519_sk type 12
debug1: identity file C:\\Users\\engineer/.ssh/id_ed25519_sk-cert type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_xmss-cert type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\engineer/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.4p1 Debian-5+deb11u1
debug1: compat_banner: match: OpenSSH_8.4p1 Debian-5+deb11u1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.0.194:22 as 'manager'
debug1: load_hostkeys: fopen C:\\Users\\engineer/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:0zsBobXfjndLeRNgGGIeaqMSGPHw1NUy1K7Z73vqLWU
debug1: load_hostkeys: fopen C:\\Users\\engineer/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory
debug1: Host '192.168.0.194' is known and matches the ED25519 host key.
debug1: Found key in C:\\Users\\engineer/.ssh/known_hosts:2
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: C:\\Users\\engineer/.ssh/id_rsa
debug1: Will attempt key: C:\\Users\\engineer/.ssh/id_ecdsa
debug1: Will attempt key: C:\\Users\\engineer/.ssh/id_ecdsa_sk
debug1: Will attempt key: C:\\Users\\engineer/.ssh/id_ed25519
debug1: Will attempt key: C:\\Users\\engineer/.ssh/id_ed25519_sk ED25519-SK SHA256:A5kEAoukCasO+iDri1N98ozIxVdL/aVpiG1kVMGr6NQ authenticator
debug1: Will attempt key: C:\\Users\\engineer/.ssh/id_xmss
debug1: Will attempt key: C:\\Users\\engineer/.ssh/id_dsa
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected]>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: C:\\Users\\engineer/.ssh/id_rsa
debug1: Trying private key: C:\\Users\\engineer/.ssh/id_ecdsa
debug1: Trying private key: C:\\Users\\engineer/.ssh/id_ecdsa_sk
debug1: Trying private key: C:\\Users\\engineer/.ssh/id_ed25519
debug1: Offering public key: C:\\Users\\engineer/.ssh/id_ed25519_sk ED25519-SK SHA256:A5kEAoukCasO+iDri1N98ozIxVdL/aVpiG1kVMGr6NQ authenticator
debug1: Server accepts key: C:\\Users\\engineer/.ssh/id_ed25519_sk ED25519-SK SHA256:A5kEAoukCasO+iDri1N98ozIxVdL/aVpiG1kVMGr6NQ authenticator
debug1: find_helper: using "C:\\Program Files\\OpenSSH\\ssh-sk-helper.exe" as helper
debug1: client_converse: helper returned error -59
debug1: identity_sign: sshkey_sign: requested feature not supported
sign_and_send_pubkey: signing failed for ED25519-SK "C:\\Users\\engineer/.ssh/id_ed25519_sk": requested feature not supported
debug1: Trying private key: C:\\Users\\engineer/.ssh/id_xmss
debug1: Trying private key: C:\\Users\\engineer/.ssh/id_dsa
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey).

Expected behavior

Able to authenticate a SSH session without touching yubikey

Actual behavior

Prompt `requested feature not supported`

Error details

No response

Environment data

- Yubikey 5 firmware is `5.4.3`
- SSH Client: Windows 11 - `OpenSSH_for_Windows_9.2p1, LibreSSL 3.6.1`
- SSH server: Debian bullseye - `OpenSSH_8.4p1 Debian-5+deb11u1, OpenSSL 1.1.1n`

Version

OpenSSH_for_Windows_9.2p1, LibreSSL 3.6.1

Visuals

No response

ccy avatar Mar 15 '23 09:03 ccy

On the server you are trying to connect to (the Debian host), do you have the option "no-touch-required" specified before and on the same line as your public key in ~/.ssh/authorized_keys? sshd's default behaviour is to reject no-touch-required keys.

More info here: https://wiki.archlinux.org/title/SSH_keys#:~:text=Additionally%2C,authorized_keys

beachrunner2k avatar Jun 10 '23 12:06 beachrunner2k

I have tried both, editing ssh config and adding no-touch-required to authorized_keys. none of them worked.

lucidnx avatar Jun 15 '23 22:06 lucidnx

I have the same issue

debug1: identity_sign: sshkey_sign: requested feature not supported
sign_and_send_pubkey: signing failed for ECDSA-SK ".\\id_ecdsa_sk_no-touch-required": requested feature not supported

Using :

  • yubi 5C 5.4.2
  • Win10 OpenSSH_for_Windows_9.4p1, LibreSSL 3.7.3
  • SSH server: Debian bullseye - OpenSSH_8.4p1 Debian-5+deb11u1, OpenSSL 1.1.1n

ssh-keygen -t ecdsa-sk -O resident -O application=ssh:key-touch-required -O verify-required -O no-touch-required

playerla avatar Oct 19 '23 09:10 playerla

Same issue here, any luck?

debug1: Server accepts key: C:\Users\Admin\.ssh\id_ed25519_sk_notouch ED25519-SK SHA256:0ynUvuILoRAERXsWjcDNszAtfTbzCUrF+xmrsHfCZfM explicit authenticator debug1: find_helper: using "C:\Program Files\OpenSSH\ssh-sk-helper.exe" as helper debug1: client_converse: helper returned error -59 debug1: identity_sign: sshkey_sign: requested feature not supported sign_and_send_pubkey: signing failed for ED25519-SK "C:\Users\Admin\.ssh\id_ed25519_sk_notouch": requested feature not supported debug2: we did not send a packet, disable method debug1: No more authentication methods to try. aubrey@localhost: Permission denied (publickey).

aubreyshomo avatar Dec 31 '23 06:12 aubreyshomo

Same issue still

Keyinator avatar Feb 05 '24 21:02 Keyinator

Seems like its the same issue as here: https://bugzilla.mindrot.org/show_bug.cgi?id=3355

mkrakowitzer avatar Apr 13 '24 19:04 mkrakowitzer

Same issue still. It works on linux and macos.

woniu7 avatar Aug 02 '24 11:08 woniu7