PSMP Public key authentication error via putty string: Server refused our key

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

PSMP Public key authentication error via putty string: Server refused our key

L2 Linker

Hi all,

I'm encountering an issue with a new PSMP installation. When trying to connect via SSH using public key authentication, I receive the following error:

Server refused our key

Here’s what I’ve verified so far:

  • SSH configuration appears to be correct (
  • PubkeyAuthentication yes
  • , correct file permissions, etc.).
  • Public key is properly configured — we are able to successfully log in using PSM with the same key.
  • PSMP platform and authentication settings are correctly set.
  • Password-based login via PSMP works without issue.
  • Connection string is correct and in the expected format.
  • Using PuTTY version Release 0.82-1 for the SSH connection.
  • SSH debug logging (
  • LogLevel DEBUG3
  • ) shows:
  • Authentication failed for user XYZ - server refused our key

After extensive troubleshooting including the use of CyberArk diagnostics tools CyberArk support suggested the issue may be related to the operating system. However, we haven’t been able to identify any OS-level issues, especially since PSM-based connections work without any problems using the same credentials and keys.

Has anyone encountered a similar situation or have any suggestions on what else to check?

Any help is greatly appreciated. Thanks!

8 REPLIES 8

L7 Applicator

Hi @Ani Lawrence​ 

 

Can you please check the following? Hope it helps !

 

  • Can you please confirm that the private key file (PPK) is in the correct format for PuTTY? The PuTTY uses its own proprietary format for SSH keys, so if you’re using an OpenSSH private key format, you’ll need to convert it using PuTTYgen.
  • With newer OpenSSH versions older key algorithms like ssh-rsa might be deprecated or disabled by default. If your public key was generated with an older algorithm, or PuTTY is using one, the PSMP's SSH server might refuse it.
  • Please check your sshd_config for these parameters. You might need to explicitly add +ssh-rsa
  • Also check sshd_config and validate PubkeyAcceptedAlgorithms used.
  • Please check the /var/log/auth.log or /var/log/secure files on the target Linux server to identify more specific reasons why the SSH connection is being denied.

 

Please also look at the following Community thread.

 

https://community.cyberark.com/s/question/0D52J00007AQQw6SAH/receiving-error-message-server-refused-our-key-when-attempting-to-connect-to-a-linux-server-via-psmssh-converted-the-key-to-ppk-file-format-but-still-having-no-success

L2 Linker
  • Can you please confirm that the private key file (PPK) is in the correct format for PuTTY? The PuTTY uses its own proprietary format for SSH keys, so if you’re using an OpenSSH private key format, you’ll need to convert it using PuTTYgen.

 

I am currently using OpenSSH public key format, I cannot confirm the format of the private key as is stored on a smart card. We are able to connect using psm with it successfully

 

  • With newer OpenSSH versions older key algorithms like ssh-rsa might be deprecated or disabled by default. If your public key was generated with an older algorithm, or PuTTY is using one, the PSMP's SSH server might refuse it.

 

 

 

 

  • Please check your sshd_config for these parameters. You might need to explicitly add +ssh-rsa

 

 #PSMP Authentication Configuration Block End

PubkeyAcceptedKeyTypes +ssh-rsa

PubkeyAcceptedKeyTypes +ssh-rsa

LogLevel DEBUG3

 

 

  • Also check sshd_config and validate PubkeyAcceptedAlgorithms used.

 

 

 

pubkeyacceptedalgorithms ecdsa-sha2-nistp256,[email protected],ecdsa-sha2-nistp384,[email protected],ecdsa-sha2-nistp521,[email protected],rsa-sha2-256,[email protected],rsa-sha2-512,[email protected]

 

  • Please check the /var/log/auth.log or /var/log/secure files on the target Linux server to identify more specific reasons why the SSH connection is being denied.

 

 

 

> </PSMSSHProxyRetrievePublicSSHKeysRequest> </RequestBase> </Element> </Elements>

[16/07/2025 | 08:01:37.265235] | {pid=17744} | {tid=229515313} | STATIC               | PSMP/Sessions/PSPPublicSSHKeysRetrievalSession.cpp(211)   | :: | PSMPPS345I [a018e8b4-623c-11f0-a3eb-001dd80be7dc] Successfully retrieved [1] public SSH keys for user [XZY]

[16/07/2025 | 08:28:21.695843] | {pid=17744} | {tid=229515187} | P11CAPPMessage           | PSMP/RequestResponse/APPMessage.cpp(231)           | :: | 506I Load message content after decryption: <Elements> <Element> <ElementType>PSMSSHProxyRetrievePublicSSHKeysRequest</ElementType> <RequestBase> <ExecPath></ExecPath> <PSMSSHProxyRetrievePublicSSHKeysRequest> <SessionUUID>5c71b11e-6240-11f0-81b5-001dd80be7dc</SessionUUID> <UserName>nbwhn49</UserName> </PSMSSHProxyRetrievePublicSSHKeysRequest> </RequestBase> </Element> </Elements>

[16/07/2025 | 08:28:21.746203] | {pid=17744} | {tid=229515187} | STATIC               | PSMP/Sessions/PSPPublicSSHKeysRetrievalSession.cpp(211)   | :: | PSMPPS345I [5c71b11e-6240-11f0-81b5-001dd80be7dc] Successfully retrieved [1] public SSH keys for user [XYZ]

[16/07/2025 | 08:32:39.980882] | {pid=17744} | {tid=229515124} | P11CAPPMessage           | PSMP/RequestResponse/APPMessage.cpp(231)           | :: | 506I Load message content after decryption: <Elements> <Element> <ElementType>PSMSSHProxyRetrievePublicSSHKeysRequest</ElementType> <RequestBase> <ExecPath></ExecPath> <PSMSSHProxyRetrievePublicSSHKeysRequest> <SessionUUID>f664da6c-6240-11f0-8f3c-001dd80be7dc</SessionUUID> <UserName>XYZ</UserName> </PSMSSHProxyRetrievePublicSSHKeysRequest> </RequestBase> </Element> </Elements>

[16/07/2025 | 08:32:40.039824] | {pid=17744} | {tid=229515124} | STATIC               | PSMP/Sessions/PSPPublicSSHKeysRetrievalSession.cpp(211)   | :: | PSMPPS345I [f664da6c-6240-11f0-8f3c-001dd80be7dc] Successfully retrieved [1] public SSH keys for user [XYZ]

 

 

 

L2 Linker

Hi,

 

What is your OS version of PSMP, You are getting the error when PSMP authenticate to the the vault, right?

If so check the output in PSMP server, (take a snapshot for the server if needed)

#update-crypto-policies --show

#update-crypto-polices --set LEGACY then reboot the server and test it again to see if it works.

 

Please log a support case so our PSMP team can assist you.

L7 Applicator

Hi

 

The PSM works differently and it’s not an SSH daemon but handles the authentication process differently without the strict algorithm restrictions.

 

This is why the same key can work with PSM but fail with PSMP. The PSMP, on the other hand, relies on its  sshd configuration.

 

Please try to enable a wider range of public key types in the sshd_config file on the PSMP server

 

PubkeyAcceptedKeyTypes +ssh-rsa,rsa-sha2-256,rsa-sha2-512

 

Please add ssh-rsa PubkeyAcceptedAlgorithms

 

Hope it helps !

 

 

 

 

 

 

 

 

L2 Linker

Thank you but we already have that enabled and the server still rejects the key.

 

# PSMP Authentication Configuration Block Start

Match Group PSMConnectUsers

 AuthenticationMethods publickey,keyboard-interactive keyboard-interactive

 AuthorizedKeysCommand /opt/CARKpsmp/bin/psshkeys_runner.sh

 AuthorizedKeysCommandUser root

 

# PSMP Authentication Configuration Block End

 

PubkeyAcceptedAlgorithms +ssh-rsa

PubkeyAcceptedKeyTypes +ssh-rsa

LogLevel DEBUG3

The LEGACY mode short down ssh connection on the server we have to login via console to enable it back to default.

L7 Applicator

Hi @Ani Lawrence​ 

 

Please check that the script is executable by running following command.

 

ls -l /opt/CARKpsmp/bin/psshkeys_runner.sh

 

It shluld be rwxr-xr-x and owned by root.

 

Also please run this command as root

 

/opt/CARKpsmp/bin/psshkeys_runner.sh <vaultuser>

 

If it’s working, it should output the public key and if it is failing you’ll get no output.

 

In addition try to ssh to PSMP using following command

 

ssh -i private_key <vaultuser>@<psmp-host>

 

And also ensure the permissions are correct

 

chown psmpgw:psmpgw /etc/opt/CARKpsmp/bin/psmp_ssh_keys

 

chmod 755 /etc/opt/CARKpsmp/bin/psmp_ssh_keys

 

Hope it helps !

L2 Linker

✅ Issue Resolved

Issue:

“Server refused our key — unable to authenticate using PIV card, but normal password login works.”

 

✅ Solution Steps

  1. Map the public key in Active Directory:
    • Open the user object in Active Directory
    • Go to the “Attribute Editor” tab.
  • Locate the
  • telephone
    • attribute.
    • Paste the PIV card public key into this field under “Note”
    • Click Apply and OK to save.
  1. Verify the attribute using PowerShell:
  2.  
  3. Get-ADUser -Identity XYZ -Properties * | Format-List
  • Replace
  • XYZ
    • with the actual username.
  • Confirm where the public key is stored — in this case, it appeared under the
  • info
    • attribute.
  1. Configure the vault (PVWA) to read the public key:
  • Navigate to:
    • PVWA > System Configuration > Options > LDAP Integration > Profiles
  • Edit the
  • MicrosoftADProfile.ini
  • Set the
  • UserSSHPublicKey parameter to the attribute where the key is stored (e.g.,
  • info
  1. Restart relevant services:
    • Restart the PSMP and SSH services to apply changes.
  1. Test PIV login:
    • Attempt authentication using the PIV card to confirm resolution.

 

  • 640 Views
  • 8 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!