On PSMP version 12.6 and above - Error when connecting to an account using SSH keys
Symptom
Connections via PSM for SSH using SSH key end up with the following error message:
psclientapp_sshkey_authentication: loading sshkey failed: unexpected internal error user@hostname: Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
Environment
12.6 Privileged Access Manager (PAM, self-hosted);Privilege Cloud PSMP PSMP, PAS/ Pcloud
Cause
Support for SSH-RSA was deprecated in OpenSSH v8.8. This will cause SSH key authentication to the target with the specific private key type matching ssh-rsa to fail.
Resolution
To support this key type, add the specific algorithm back to the ssh configuration file.
For more information, see https://www.openssh.com/txt/release-8.8
To enable usage of this deprecated public key algorithm add to your SSH configuration file:
PubkeyAcceptedKeyTypes +ssh-rsa
To add the above globally, place the line in:
/etc/ssh/ssh_config (not in sshd_config)
To add it only for PSMP connections add the line in:
/home/PSMShadowUser/.ssh/config
If the file does not exist - create it using the following commands:
-
touch /home/PSMShadowUser/.ssh/config (if the config file does not exist)
-
chmod 640 /home/PSMShadowUser/.ssh/config
-
chown PSMShadowUser.PSMShadowUsers /home/PSMShadowUser/.ssh/config
This is also mentioned in the release notes paragraph #11:
https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/Release%20Notes/RN-WhatsNew12-6.htm?tocpath=Get%20Started%7CWhat%E2%80%99s%20New%7CRelease%20Notes%7C_____1#Behaviorchangenotes