RDM 2026.3.2.1 Linux – YubiKey PIV PKCS#11 SSH disconnects after PIN, before touch confirmation
Hello Devolutions Team,
I would like to report a reproducible issue with YubiKey PIV authentication over SSH in Remote Desktop Manager for Linux.
The same YubiKey, PKCS#11 module, private key, and SSH server work correctly with native OpenSSH on Ubuntu. However, RDM terminates the connection immediately after entering the PIV PIN, while the YubiKey is still waiting for physical touch confirmation.
I have performed extensive testing to isolate the problem.
Client:
Operating system: Ubuntu 24.04 LTS
Architecture: x86_64
Desktop environment: GNOME
Display server: X11
Remote Desktop Manager: 2026.3.2.1 (64-bit)
OpenSSH: 9.6p1
OpenSC: 0.25.0~rc1-1ubuntu0.2
PKCS#11 library: /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so
YubiKey Manager CLI: 5.2.1
Hardware security key:
Model: YubiKey 5C NFC
Firmware: 5.7.4
Application: PIV
PIV slot: 9A (PIV Authentication)
Algorithm: ECC P-256
Key generated directly on the YubiKey
PIN policy: ALWAYS
Touch policy: ALWAYS
Self-signed X.509 certificate: CN=YubiKey-SSH
Private key: Hardware-resident and non-exportable
SSH server:
Debian Linux virtual machine on a local network
OpenSSH server
Public-key authentication enabled
Password authentication enabled
AuthenticationMethods any
YubiKey public key installed in the user's ~/.ssh/authorized_keys
The SSH server is functioning correctly and accepts the YubiKey public key when using native OpenSSH.
OpenSC detects the YubiKey correctly.
Command:
pkcs11-tool \
--module /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so \
--list-slotsRelevant output:
Slot 0: Yubico YubiKey OTP+FIDO+CCID
token label: YubiKey-SSH
token flags: login required, rng, token initialized, PIN initializedThe PIV authentication certificate is visible:
pkcs11-tool \
--module /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so \
--list-objects \
--type certOutput:
Certificate Object; type = X.509 cert
label: Certificate for PIV Authentication
subject: DN: CN=YubiKey-SSH
ID: 01After entering the PIV PIN, OpenSC also detects the private key object:
pkcs11-tool \
--module /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so \
--login \
--list-objects \
--type privkeyOutput:
Private Key Object; EC
label: PIV AUTH key
ID: 01
Usage: sign
Access: sensitive, always sensitive, never extractable, localThis confirms that the existing PIV private key is available for signing operations through PKCS#11 without exporting private key material.
I performed a direct PKCS#11 ECDSA signing test using the existing key in PIV slot 9A.
The operation required:
Entering the PIV PIN.
Physically touching the YubiKey.
The operation successfully produced a 64-byte raw ECDSA signature.
After converting the signature to ASN.1 DER format, I verified it using OpenSSL and the corresponding public key.
Command:
openssl pkeyutl -verify \
-pubin \
-inkey "$HOME/yubikey_ssh_9a_public.pem" \
-sigfile "$HOME/yubikey_piv_test/signature.der" \
-in "$HOME/yubikey_piv_test/digest.bin"Result:
Signature Verified SuccessfullyTherefore, ECDSA signing through OpenSC works correctly with the hardware-protected key, including PIN and touch enforcement.
The same YubiKey successfully authenticates to the Debian SSH server using the native Ubuntu OpenSSH client.
Command:
ssh \
-o PKCS11Provider=/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so \
-o PreferredAuthentications=publickey \
-o PasswordAuthentication=no \
-o KbdInteractiveAuthentication=no \
<SSH_USER>@<DEBIAN_TEST_VM>Observed behavior:
OpenSSH requests the YubiKey PIV PIN.
I enter the PIN.
The YubiKey indicates that physical touch is required.
I touch the YubiKey.
Public-key authentication succeeds.
The Debian SSH shell opens normally.
I have successfully repeated this test multiple times.
Password and keyboard-interactive authentication are explicitly disabled for these tests, so the successful connection cannot be attributed to password fallback.
The Debian SSH logs confirm successful public-key authentication:
Accepted publickey for <SSH_USER> from <CLIENT_IP>
ssh2: ECDSA SHA256:<REDACTED_PUBLIC_KEY_FINGERPRINT>Followed by:
pam_unix(sshd:session): session opened for user <SSH_USER>Native OpenSSH authentication works reliably with this exact YubiKey and PKCS#11 module.
I created a separate SSH Shell test connection in RDM.
Configuration:
Connection type: SSH Shell
Host: <DEBIAN_TEST_VM>
Username: <SSH_USER>
Password: Empty
Use smart card: Enabled
Certificate method: PKCS
PIN code: Empty
SSH key → Private key: No private key
Algorithm support: Default
Use SSH authentication agent: Disabled
Display error messages: Default (Yes)The PIN field is intentionally empty because I do not want to store the security key's PIN in the application.
In the RDM application settings, the Smart Card PKCS library is configured as:
/usr/lib/x86_64-linux-gnu/opensc-pkcs11.soI verified that the RDM process actually loads this library:
sudo lsof -nP | grep -F 'opensc-pkcs11.so'Relevant output:
RemoteDes ... <LOCAL_USER> ... /usr/lib/x86_64-linux-gnu/opensc-pkcs11.soTherefore, RDM loads the correct OpenSC PKCS#11 library.
I also disconnected my second hardware security key during testing, leaving only the YubiKey 5C NFC available to OpenSC.
Steps to reproduce:
Connect the YubiKey 5C NFC.
Start Remote Desktop Manager 2026.3.2.1 on Ubuntu 24.04.
Open the SSH Shell test connection.
RDM displays a PIV PIN prompt.
Enter the correct PIV PIN.
Actual behavior:
Immediately after entering the PIN:
The PIN prompt disappears.
RDM terminates the SSH connection attempt.
The interface returns to the connection's Overview screen.
No terminal session opens.
No visible error message is displayed.
The YubiKey remains illuminated, apparently waiting for physical touch confirmation.
Touching the YubiKey turns off the light, but RDM does not resume the connection.
This behavior is reproducible.
The key observation is that RDM abandons the SSH connection while the YubiKey is still indicating that physical interaction is required.
The YubiKey does not show exactly the same LED behavior as during a successful native OpenSSH authentication.
I understand that the LED behavior alone does not prove the cause, but the disconnect timing is consistent.
I monitored the SSH server logs during a single controlled RDM connection attempt:
sudo journalctl -u ssh -f -o short-isoThe server recorded:
sshd[<PID>]: Connection closed by authenticating user <SSH_USER> <CLIENT_IP> port <PORT> [preauth]There was no corresponding Accepted publickey message for that controlled RDM attempt.
The connection therefore ended before SSH authentication completed.
By contrast, native OpenSSH attempts produce successful Accepted publickey events followed by the opening of a user session.
Connection logging
I enabled:
Enable logging: Yes
Log path type: Custom
Log mode: Event
Verbose: 4
Log into terminal: NoThe custom log file was not created during the failed authentication attempts.
Launching RDM from an Ubuntu terminal
I started RDM using:
remotedesktopmanager 2>&1 | tee "$HOME/rdm-piv-console.log"The output file was created successfully but remained empty after reproducing the issue.
RDM Application logs
I opened:
Help → Application logs
I enabled all available log types:
Error
Error silent
Info
Only informational messages relating to a local database upgrade were displayed.
There were no relevant SSH, PKCS#11, ECDSA, or smart-card authentication errors.
RDM System diagnostics
I checked:
Help → System diagnostics
Relevant information:
Ubuntu 24.04
Architecture: X64
Desktop environment: GNOME
Display server: X11
Container: None
Debug level: 1The report did not identify the SSH authentication failure.
SSH algorithm configuration
I inspected RDM's Algorithm support settings.
The available categories were:
Cipher
Host key
Kex
MAC
ECDSA SHA2 NIST P-256 is available in the host-key algorithm list.
I left Algorithm support set to Default because host-key algorithms are distinct from client public-key authentication algorithms.
I expect RDM to:
Load the configured OpenSC PKCS#11 module.
Use the existing ECC P-256 PIV Authentication key in slot 9A.
Request the PIV PIN.
Wait for physical touch confirmation without terminating the SSH connection.
Complete ECDSA signing using the private key on the YubiKey.
Complete SSH public-key authentication.
Open the SSH terminal session.
This exact authentication flow works with native OpenSSH.
Could you please clarify the following?
1. Is SSH authentication using YubiKey PIV through OpenSC PKCS#11 officially supported in Remote Desktop Manager 2026.3.2.1 for Linux?
2. Does this implementation support ECC P-256 PIV keys configured with both PIN ALWAYS and TOUCH ALWAYS?
3. Is there a known issue where the SSH connection closes immediately after entering the PIV PIN while the hardware token is still waiting for physical touch?
4. Could the behavior be related to the handling of blocking PKCS#11 signing operations, touch confirmation, a timeout, or an asynchronous signing issue?
5. Is CKM_ECDSA signing through OpenSC supported in this SSH authentication scenario?
6. Is the following configuration correct for a hardware-resident PIV key?
Use smart card: Enabled
Certificate method: PKCS
Private key: No private key
PIN code: Empty7. Can RDM on Linux use native OpenSSH or an external OpenSSH SSH agent for PKCS#11-backed SSH authentication instead of its internal smart-card implementation?
8. How can detailed SSH authentication and PKCS#11 signing diagnostics be enabled in the Linux application?
9. Is this a known issue, and is there a fix, workaround, or newer build that addresses it?
I would strongly prefer a solution that preserves the existing security policies:
PIN ALWAYS
TOUCH ALWAYSI do not want to export or locally store the private key or weaken the hardware authentication requirements.
WORKING:
Ubuntu OpenSSH
→ OpenSC PKCS#11
→ YubiKey 5C NFC / PIV 9A
→ PIV PIN
→ Physical touch
→ ECC P-256 ECDSA signature
→ Successful Debian SSH authenticationFAILING:
Remote Desktop Manager 2026.3.2.1
→ OpenSC PKCS#11 library loaded
→ YubiKey PIV PIN requested
→ Correct PIN entered
→ SSH connection immediately closes
→ YubiKey remains illuminated awaiting touch
→ SSH authentication does not completeBecause the same hardware token, private key, PKCS#11 module, and SSH server work successfully through native OpenSSH, I suspect an issue in RDM's Linux SSH/PKCS#11 authentication flow.
I would appreciate confirmation of the supported configuration and guidance on diagnosing or resolving this behavior.
Thank you for your assistance.
Hello Matija,
Thank you for this very complete report, the tests you already ran save us a lot of time.
To answer your main questions:
- Your configuration is correct for a hardware-resident PIV key: Use smart card enabled, PKCS, no private key, and an empty PIN code so that RDM asks for it. On Linux, RDM uses the library set in Settings > Application > Paths, which you have already confirmed is loaded.
- This is not a known issue at the moment.
- The missing error message is expected in this situation: when authentication stops, RDM for Linux closes the tab and returns to the Overview without a message. We see the same behavior in our lab, so the empty screen itself does not tell us the cause.
- About the SSH agent: the "Use SSH authentication agent" option exists in the Advanced tab, but we have not validated it with PKCS#11 keys on Linux, so I would rather look at the logs below first.
To find out where the authentication stops, could you please send me the following:
1. RDM session log
- Which exact value did you enter in "Log path" during your tests?
- Then please try again with these settings in the entry's Logs tab: Enable logging checked, Log path type Custom, Log path set to a full file path such as /home/<your user>/rdm-ssh.log (a file, not a folder, and without ~), Log mode Event, and "Log into terminal" unchecked.
- Save the entry, connect once, enter the PIN, and send me the file. Please check that your PIN does not appear in it.
2. SSH server debug output
On the Debian test server, start a second SSH daemon in debug mode on a free port, so your normal SSH service is not affected:
sudo /usr/sbin/sshd -ddd -p 2222
In the RDM entry, set the port to 2222 and connect once, entering the PIN as before. The debug daemon stops after this one connection. Please copy everything it printed and send it to me. It shows which key RDM offered and whether a signature was received. You can replace the user name and IP addresses if you prefer. If a firewall is active on the server, port 2222 needs to be allowed for this test.
3. Environment
- Which workspace type do you use in RDM (local, Devolutions Server, Devolutions Cloud or other)?
- Which package did you install (.deb, .rpm or .tar.xz)?
- If this setup ever worked with an earlier RDM version, which one?
Once I have these results, I will review them and get back to you.
Best regards,
Alexis Geller Peiro
Hello Alexis,
Thank you for your detailed instructions.
I have completed the requested diagnostic tests, including the RDM session log and the Debian OpenSSH debug test on port 2222.
I will share the results in separate replies to keep the diagnostic output manageable.
1. RDM Session Log
Logging settings:
Enable logging: Enabled
Log path type: Custom
Log path: /home/<LOCAL_USER>/rdm-ssh-piv-debug.log
Log mode: Event
Verbose: 4
Log into terminal: Disabled
After saving these settings, I performed one connection attempt.
RDM requested the PIV PIN. After entering it, the session closed and RDM returned to the Overview. The YubiKey LED remained illuminated briefly, and touching it did not restore the connection.
The resulting log file was 153 bytes and contained:
[11/10/2026 5:27:52 PM] Devolutions.ProtocolsSharp: 2026.9.28.2 OS: Linux
[11/10/2026 5:27:52 PM] SSH session: Failed to initiate PKCS11 ECDSA signingNo PIN, password, or private key material was present in the log.
I will provide the anonymized SSH server debug output and environment details in the following replies.
Best regards,
Matija
2. Debian SSH Server Debug Results
I started a separate SSH daemon using:
sudo /usr/sbin/sshd -ddd -p 2222
The normal SSH service on port 22 remained unchanged.
RDM requested the PIV PIN and then disconnected as before.
The Debian debug log contains these messages:
Remote software version: Devolutions1.0
KEX done
Public key algorithm: ecdsa-sha2-nistp256
Matching key found in authorized_keys
Public key authentication test: ECDSA key is allowed
Postponed publickey
Connection closed by authenticating user
All fingerprints and identifying information have been removed.
I will provide the complete anonymized debug output separately.
Continuing with the anonymized Debian SSH debug output.
These are the relevant authentication messages from the original server log:
debug1: userauth-request for user <SSH_USER> service ssh-connection method publickey [preauth]
debug1: userauth_pubkey: publickey test pkalg ecdsa-sha2-nistp256 pkblob ECDSA SHA256:<REDACTED_YUBIKEY_PIV> [preauth]
debug1: /home/<SSH_USER>/.ssh/authorized_keys:1: matching key found: ECDSA SHA256:<REDACTED_YUBIKEY_PIV>
Accepted key ECDSA SHA256:<REDACTED_YUBIKEY_PIV> found at /home/<SSH_USER>/.ssh/authorized_keys:1
debug3: mm_answer_keyallowed: publickey authentication test: ECDSA key is allowed
debug3: send packet: type 60 [preauth]
debug2: userauth_pubkey: authenticated 0 pkalg ecdsa-sha2-nistp256 [preauth]
Postponed publickey for <SSH_USER> from <CLIENT_IP> port <CLIENT_EPHEMERAL_PORT> ssh2 [preauth]
Connection closed by authenticating user <SSH_USER> <CLIENT_IP> port <CLIENT_EPHEMERAL_PORT> [preauth]
All fingerprints and identifying information have been redacted.
3. Environment Information
Here are the remaining details you requested.
Workspace:
Type: Local SQLite data source
Workspace name: Local data source
Database: Connections.db
Database schema: v1.155
Caching mode: In-memory
Devolutions Server/Cloud: Not used
RDM installation:
Version: 2026.3.2.1 (64-bit)
Installation package: .deb
Package name: remotedesktopmanager
.NET version: 10.0.14
Previous RDM version:
Previously installed: 2024.3.1.3
Upgraded directly to: 2026.3.2.1
I did not perform a confirmed successful YubiKey PIV/PKCS#11 SSH authentication test with the older version, so I cannot confirm whether this is a regression.
Client:
Ubuntu 24.04 LTS (GNOME, amd64)
OpenSSH client: 9.6p1
OpenSC: 0.25.0~rc1-1ubuntu0.2
PKCS#11 library: /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so
SSH server:
Debian 12
OpenSSH server: 9.2p1
Normal SSH port: 22
Debug SSH port: 2222
YubiKey:
Model: YubiKey 5C NFC
Firmware: 5.7.4
PIV slot: 9A
Algorithm: ECC P-256
PIN policy: ALWAYS
Touch policy: ALWAYS
Private key generated on the device and non-exportable.
Native OpenSSH authentication with this same YubiKey and OpenSC library continues to work successfully, requiring both the PIV PIN and physical touch.
No changes were made to the PIV key or its security policies during testing.
As requested, I have attached the complete Debian OpenSSH server debug log from the test on port 2222.
The log includes the full SSH connection and authentication sequence.
For privacy reasons, usernames, IP addresses, public key data, and SSH fingerprints have been redacted. All relevant diagnostic messages have been preserved.
I hope this helps with your investigation.
Best regards,
Matija
Hello Matija,
Thank you for the very complete results, they were exactly what we needed.
The two logs point to the same step. On the server side, the connection is fine up to the key check: RDM offers the correct ECDSA key from your YubiKey, the server finds it in authorized_keys and tells RDM to go ahead. RDM then closes the connection without sending the signature, and the RDM log shows why: "Failed to initiate PKCS11 ECDSA signing". So the failure happens in RDM when it asks the YubiKey to sign, not in your server or entry configuration. We have no open issue for this error, so I have opened an investigation with our team.
One more check would help us. It is read-only, does not ask for the PIN and does not change anything on the key:
pkcs11-tool --module /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so --list-objects --type privkey
Please share the block for the 9A key (you can redact the label). We want to see whether the "Access" line contains "always authenticate", which is how the PIN policy ALWAYS is usually presented to applications.
Until we have news, the native OpenSSH client remains the way to connect with this key.
Best regards,
Alexis Geller Peiro
Hello Alexis,
Thank you for the update and for opening an investigation with your team.
I ran the exact command you requested, with only my YubiKey 5C NFC connected:
pkcs11-tool --module /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so --list-objects --type privkey
The complete output was:
Using slot 0 with a present token (0x0)No private key objects or Access attributes were displayed.
I did not use --login or enter a PIN, as instructed.
Would you like me to perform an additional diagnostic check with PIN authentication to inspect the 9A private key attributes?
Best regards,
Matija
Hello Matija,
Thank you for running it so quickly. Yes, please run it once more with PIN authentication, that was my mistake: on PIV, OpenSC only lists the private key objects after login.
pkcs11-tool --module /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so --login --list-objects --type privkey
Please type the PIN when it asks for it, and do not use the --pin option, so it does not end up in your shell history. This only lists the key objects: nothing is signed, no touch is needed and nothing changes on the key.
Please share the block for the 9A key (you can redact the label). We are looking for the "Access" line and whether it contains "always authenticate".
Best regards,
Alexis Geller Peiro
Hello Alexis,
Thank you for the clarification.
I ran the requested command with only my YubiKey 5C NFC connected and entered the PIV PIN interactively:
pkcs11-tool --module /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so --login --list-objects --type privkey
The private key object was displayed:
Private Key Object; EC
label: PIV AUTH key
ID: 01
Usage: sign
Access: sensitive, always sensitive, never extractable, localAs you can see, the Access line does not contain always authenticate.
For reference, the underlying YubiKey PIV key in slot 9A was generated with PIN policy ALWAYS and touch policy ALWAYS. Native OpenSSH authentication with this key continues to work with PIN verification and physical touch.
No changes have been made to the key or its security policies.
Best regards,
Matija
Hello Matija,
Thank you, that result ruled out the PIN policy as the cause.
We have now reproduced the problem in our lab without a YubiKey, using a software PKCS#11 token: the server accepts the key, RDM asks for the PIN, and the tab closes without connecting, exactly as on your side. It also happens with an RSA key, so it is not related to ECDSA or to your YubiKey policies. RDM does not log in to the token with the PIN before using the key, so the private key is never found and nothing is signed.
We have reported it to our development team as a bug. No further tests are needed on your side. Until it is fixed, the native OpenSSH client remains the way to connect with this key. I will update this thread when we know which version includes the fix.
Best regards,
Alexis Geller Peiro
Hello Alexis,
Thank you for the update and for taking the time to reproduce and investigate the issue.
I really appreciate your efforts and the work of the development team in identifying the root cause.
I'm glad the issue has now been confirmed and reported as a bug. I trust that a fix will be included in one of the upcoming RDM releases for Linux.
In the meantime, I will continue using native OpenSSH and look forward to your update.
Best regards,
Matija