[ssh_x509] ECDSA+cert key is not allowed
ssh_x509 at roumenpetrov.info
ssh_x509 at roumenpetrov.info
Thu Oct 9 10:08:25 EEST 2025
I guess this could be some privilege separation issue. When I set
UsePrivilegeSeparation no I do not see the ECDSA+cert is not allowed
error.
Let me dig further on this .
Thanks,
Chidanand
On Thu, Oct 9, 2025 at 11:43 AM <ssh_x509 at roumenpetrov.info> wrote:
> Hello Everyone,
> I am trying to set up pkixserver on my ubuntu VM (24.04) . I am using the
> latest pkixssh-17.0 release. I have locally compiled the code.
> I have followed the instructions in the. README.* and INSTALL .
>
> The client PC is MAC where I have again used pkixssh-17.0 , here I am using
> it as a ssh client and the openssl version is
>
> OpenSSL 3.6.0 1 Oct 2025 (Library: OpenSSL 3.6.0 1 Oct 2025)
>
>
> I am using ECDSA keys and certificates, for CA, host and user keys/certs.
>
> When I try to connect I could see key exchange is started but at one point
> it says
>
>
> ----
>
> debug3: mm_answer_keyallowed: publickey authentication test: ECDSA+cert key
> is not allowed
>
> Failed publickey for user1 from 192.168.64.1 port 55342 ssh2: ECDSA+cert
> SHA256:pwN3UMdGKv2oHQMe9EP3Or0mrunQTRO5TFO4bqHAPu8
>
> ----
>
>
> I am not able to understand what this means.
>
>
> Initially I started with RSA keys there also I got the same error and then
> shifted to ECDSA.
>
>
> The server side config, client config, client cert and their debug logs are
> pasted below.
>
> If any one has faced such an issue please throw some light here.
>
> #####################
>
> Server side config:
> Port 9922
> ListenAddress 0.0.0.0
> HostKey /home/adminuser/workdir/PKIXSSH/install/etc/hosts/host-combined.pem
> X509KeyAlgorithm x509v3-ecdsa-sha2-nistp256,ssh-sha256,ecdsa-sha2-nistp256
> CACertificateFile
> /home/adminuser/workdir/PKIXSSH/install/etc/ca/ca-bundle.crt
> TrustedUserCAKeys
> /home/adminuser/workdir/PKIXSSH/install/etc/ca/ca-bundle.crt
> PubkeyAuthentication yes
> PasswordAuthentication no
> AllowUsers user1
> AllowedCertPurpose sslclient
> KeyAllowSelfIssued yes
> MandatoryCRL no
> Subsystem sftp /home/adminuser/workdir/PKIXSSH/install/libexec/sftp-server
>
> ###########################################
> Client side config:
>
> Host pkixserver
> HostName 192.168.64.2
> Port 9922
> User user1
> IdentityFile /Users/Chidanand.Gangur at mypc/pkixuser1/user1-combined.pem
> CACertificateFile /Users/Chidanand.Gangur at mypc
> /pkixuser1/ca/ca-bundle.crt
> IdentitiesOnly yes
> PubkeyAuthentication yes
> X509KeyAlgorithm
> x509v3-ecdsa-sha2-nistp256,ssh-sha256,ecdsa-sha2-nistp256
> ############################################
> Server Side Debug Logs:
>
> /home/adminuser/workdir/PKIXSSH/install/sbin/sshd -ddd -f
> /home/adminuser/workdir/PKIXSSH/install/etc/sshd_config
> sshd version PKIX-SSH 17.0, OpenSSH_10.0p2, OpenSSL 3.0.13 30 Jan 2024
> debug3: running on Linux, release 6.14.0-33-generic, version
> #33~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 19 16:19:58 UTC 2, machine
> aarch64
>
> announced algorithms:
>
> x509v3-ecdsa-sha2-nistp256,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,rsa-sha2-256,rsa-sha2-512
>
>
> debug3: mm_answer_authserv: service=ssh-connection, style=
> debug2: monitor_read: 4 used once, disabling now
> debug3: receive packet: type 50 [preauth]
> debug1: userauth-request for user user1 service ssh-connection method
> publickey [preauth]
> debug1: attempt 1 failures 0 [preauth]
> debug2: input_userauth_request: try method publickey [preauth]
> debug3: Xkey_from_blob: pkalg='x509v3-ecdsa-sha2-nistp256', blen=1241
> [preauth]
> debug3: X509key_from_buf2_common: certificate-count: 2 [preauth]
> debug3: X509key_from_buf2_common: certificate[0]=0xc90a8e3a0320 [preauth]
> debug3: X509key_from_buf2_common: certificate[1]=0xc90a8e3b9920 [preauth]
> debug3: X509key_from_buf2_common: ocsp-response-count: 0 [preauth]
> debug1: userauth_pubkey: test pkalg x509v3-ecdsa-sha2-nistp256 pkblob
> ECDSA+cert SHA256:pwN3UMdGKv2oHQMe9EP3Or0mrunQTRO5TFO4bqHAPu8 [preauth]
> debug3: mm_xkey_allowed: entering [preauth]
> debug3: mm_request_send: entering, type 22 [preauth]
> debug3: mm_xkey_allowed: waiting for MONITOR_ANS_KEYALLOWED [preauth]
> debug3: mm_request_receive_expect: entering, type 23 [preauth]
> debug3: mm_request_receive: entering [preauth]
> debug3: mm_request_receive: entering
> debug3: monitor_read: checking request 22
> debug3: mm_answer_keyallowed: entering
> debug3: Xkey_from_blob: pkalg='x509v3-ecdsa-sha2-nistp256', blen=1241
> debug3: X509key_from_buf2_common: certificate-count: 2
> debug3: X509key_from_buf2_common: certificate[0]=0xc90a8e3aee80
> debug3: X509key_from_buf2_common: certificate[1]=0xc90a8e3b52f0
> debug3: X509key_from_buf2_common: ocsp-response-count: 0
> debug3: mm_answer_keyallowed: Xkey_from_blob: x509v3-ecdsa-sha2-nistp256
> debug1: temporarily_use_uid: 1003/1003 (e=1002/1002)
> debug1: restore_uid: (unprivileged)
> debug1: temporarily_use_uid: 1003/1003 (e=1002/1002)
> debug1: restore_uid: (unprivileged)
>
> ####### Why this error ?
> debug3: mm_answer_keyallowed: publickey authentication test: ECDSA+cert key
> is not allowed
> Failed publickey for user1 from 192.168.64.1 port 55342 ssh2: ECDSA+cert
> SHA256:pwN3UMdGKv2oHQMe9EP3Or0mrunQTRO5TFO4bqHAPu8
>
> debug3: mm_request_send: entering, type 23
> debug2: userauth_pubkey: authenticated 0 pkalg x509v3-ecdsa-sha2-nistp256
> [preauth]
> debug3: user_specific_delay: user specific delay 3.316ms [preauth]
> debug3: ensure_minimum_time_since: elapsed 2.019ms, delaying 6.297ms
> (requested 8.316ms) [preauth]
> debug3: userauth_finish: failure partial=0 next
> methods="publickey,keyboard-interactive" [preauth]
> debug3: send packet: type 51 [preauth]
> debug3: receive packet: type 50 [preauth]
> debug1: userauth-request for user user1 service ssh-connection method
> keyboard-interactive [preauth]
> debug1: attempt 2 failures 1 [preauth]
> debug2: input_userauth_request: try method keyboard-interactive [preauth]
> debug1: keyboard-interactive devs [preauth]
> debug1: auth2_challenge: user=user1 devs= [preauth]
> debug1: kbdint_alloc: devices '' [preauth]
> debug2: auth2_challenge_start: devices [preauth]
> debug3: user_specific_delay: user specific delay 3.316ms [preauth]
> debug3: ensure_minimum_time_since: elapsed 0.017ms, delaying 8.298ms
> (requested 8.316ms) [preauth]
> debug3: userauth_finish: failure partial=0 next
> methods="publickey,keyboard-interactive" [preauth]
> debug3: send packet: type 51 [preauth]
> Connection closed by authenticating user user1 192.168.64.1 port 55342
> [preauth]
> debug1: do_cleanup [preauth]
> debug1: monitor_read_log: child log fd closed
> debug3: mm_request_receive: entering
> debug1: do_cleanup
> debug1: Killing privsep child 35843
>
> ###################################################
> Client Side Debug logs:
>
> # ~/PKIXSSH/install/bin/ssh -vvv -F ./config pkixserver
>
>
> debug2: peer server KEXINIT proposal
> debug2: KEX algorithms: curve448-sha512,curve25519-sha256,
> curve25519-sha256 at libssh.org
> ,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
> kex-strict-s-v00 at openssh.com
> debug2: host key algorithms: x509v3-ecdsa-sha2-nistp256,ecdsa-sha2-nistp256
>
> debug2: languages ctos:
> debug2: languages stoc:
> debug2: first_kex_follows 0
> debug2: reserved 0
> debug1: kex: algorithm: curve448-sha512
> debug1: kex: host key algorithm: x509v3-ecdsa-sha2-nistp256
> debug1: kex: server->client cipher: aes128-ctr MAC: umac-64 at openssh.com
> compression: none
> debug1: kex: client->server cipher: aes128-ctr MAC: umac-64 at openssh.com
> compression: none
> debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
> debug1: SSH2_MSG_KEX_ECDH_REPLY received
> debug1: Server host key: x509v3-ecdsa-sha2-nistp256
> SHA256:+U5jJapyiKcllhQBetzc/y0tJqtNNBO4AwTu+d93k8c
> debug1: load_hostkeys: fopen /Users/Chidanand.Gangur at mypc
> /.ssh/known_hosts2:
> No such file or directory
> debug1: load_hostkeys: fopen
> /Users/Chidanand.Gangur at mypc/PKIXSSH/install/etc/ssh_known_hosts:
> No such file or directory
> debug1: load_hostkeys: fopen
> /Users/Chidanand.Gangur at mypc/PKIXSSH/install/etc/ssh_known_hosts2:
> No such file or directory
> debug1: Host '[192.168.64.2]:9922' is known and matches the ECDSA+cert host
> key.
> debug1: Found key in /Users/Chidanand.Gangur at mypc/.ssh/known_hosts:1
> debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
> debug2: ssh_set_newkeys: mode 1/out
> debug1: rekey out after 4294967296 blocks
> debug1: SSH2_MSG_NEWKEYS sent
> debug1: expecting SSH2_MSG_NEWKEYS
> debug1: ssh_packet_read_poll2: resetting read seqnr 3
> debug1: SSH2_MSG_NEWKEYS received
> debug2: ssh_set_newkeys: mode 0/in
> debug1: rekey in after 4294967296 blocks
> debug2: preparing keys
> debug1: Will attempt key: '*'
> /Users/Chidanand.Gangur at mypc/pkixuser1/user1-combined.pem
> ECDSA+cert SHA256:pwN3UMdGKv2oHQMe9EP3Or0mrunQTRO5TFO4bqHAPu8 explicit
> debug2: pubkey_prepare: done
> debug1: SSH2_MSG_EXT_INFO received
> debug1: kex_input_ext_info: publickey-algorithms at roumenpetrov.info
>
> =<x509v3-ecdsa-sha2-nistp256,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,rsa-sha2-256,rsa-sha2-512>
> debug1: kex_input_ext_info:
>
> server-sig-algs=<x509v3-ecdsa-sha2-nistp256,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,rsa-sha2-256,rsa-sha2-512>
> debug2: service_accept: ssh-userauth
> debug1: SSH2_MSG_SERVICE_ACCEPT received
> debug1: Authentications that can continue: publickey,keyboard-interactive
> debug1: Next authentication method: publickey
> Offering public key: 'x509v3-ecdsa-sha2-nistp256'
> /Users/Chidanand.Gangur at mypc/pkixuser1/user1-combined.pem ECDSA+cert
> SHA256:pwN3UMdGKv2oHQMe9EP3Or0mrunQTRO5TFO4bqHAPu8 explicit
> debug2: we sent a publickey packet, wait for reply
> debug1: Authentications that can continue: publickey,keyboard-interactive
> debug2: we did not send a packet, disable method
> debug1: Next authentication method: keyboard-interactive
> debug2: userauth_kbdint: entering
> debug2: we sent a keyboard-interactive packet, wait for reply
> debug1: Authentications that can continue: publickey,keyboard-interactive
> debug2: we did not send a packet, disable method
> debug1: No more authentication methods to try.
> user1 at 192.168.64.2: Permission denied (publickey,keyboard-interactive).
>
> #################################################
>
> Client side certificate :
>
> Certificate:
> Data:
> Version: 3 (0x2)
> Serial Number:
> 40:3b:1a:e8:c9:fc:47:4e:58:27:68:e9:50:c5:b8:9f:9c:fa:83:d3
> Signature Algorithm: ecdsa-with-SHA256
> Issuer: C = IN, ST = KA, L = BLR, O = MyOrg, OU = PKI, CN = My
> PKIXSSH Root CA
> Validity
> Not Before: Oct 8 10:55:45 2025 GMT
> Not After : Oct 8 10:55:45 2026 GMT
> Subject: C = IN, ST = KA, L = BLR, O = MyOrg, OU = Users, CN =
> user1
> Subject Public Key Info:
> Public Key Algorithm: id-ecPublicKey
> .
> .
> .
>
> X509v3 extensions:
> X509v3 Basic Constraints:
> CA:FALSE
> X509v3 Key Usage:
> Digital Signature, Key Encipherment
> X509v3 Extended Key Usage:
> TLS Web Client Authentication
> X509v3 Subject Key Identifier:
> 9D:8E:FB:71:6E:CE:DE:51:72:C8:30:25:28:89:73:C9:08:5A:58:AB
> X509v3 Authority Key Identifier:
>
> keyid:FC:F6:88:41:97:C0:2B:3D:E8:C9:68:1E:69:8D:06:B7:96:24:20:9B
>
> X509v3 Subject Alternative Name:
> DNS:user1, DNS:user1.local, email:user1 at myorg.com,
> URI:user1
> Signature Algorithm: ecdsa-with-SHA256
> 30:45:02:20:25:92:81:bf:a5:42:5e:d7:4f:f6:5f:56:4e:53:
> 12:51:d3:4e:b8:69:be:39:22:08:82:95:f0:7d:2e:c8:d4:cd:
>
> #####################
>
> /opt/homebrew/Cellar/openssl\@3/3.6.0/bin/openssl verify -CAfile
> ca/ca-bundle.crt user1-cert.pem
> user1-cert.pem: OK
> _______________________________________________
> ssh_x509 mailing list
> ssh_x509 at roumenpetrov.info
> http://roumenpetrov.info/mailman/listinfo/ssh_x509_roumenpetrov.info
>
More information about the ssh_x509
mailing list