PSMP - ClientApp=SSH : SSH Session errors with "no matching X"
Symptom
Connecting through the PSMP after providing your Vault User Credential successfully, and the PSMP is attempting to connect to a target system; ie after the prompt: "This session is being recorded"
Connecting to some target systems fail. The following error appears in logging:
Environment
11.7;12.0
PSM for SSH, PSMP v11.7.1+
Connection Component setting (PSMP-SSH) for ClientApp using "ssh" ie
{PSPComponentsFolder}/ssh [...]
/opt/CARKpsmp/components/ssh
Cause
Difference in available cryptography algorithms for SSH between the PSMP and the Target System
(ciphers, macs, kexalgorithms, hostkeyalgorithms)Resolution
The ClientApp in use /opt/CARKpsmp/components/ssh is based on an OpenSSH client version, this version differs by PSMP version installed. The client version, determines the default cryptography that is used, and can also determine the cryptography that is available for use.
This client app will also get it's crypto policy from the PSMP Server OS configuration:
This can be configured in:
1) /etc/ssh/ssh_config
and may additionally point to a global OS configuration if it contains a line such as:
Include /etc/crypto-policy/back-ends/openssh.config
2) /home/PSMShadowUser/.ssh/config
Please consider the security implications of making changes to the cryptography in use, as using legacy cryptography may open your environment to vulnerability. The preferred solution is to update the target systems to use modern cryptography.
To update the cryptography in use by PSM for SSH; the preferred method is to update the shadow user configuration file,
/home/PSMShadowUser/.ssh/config, and to limit the changes to the specific target system(s) in question:
Additional information on how to make these changes can be found in the OpenSSH documentation:
# man ssh_config
An example of updating the KEX allowed for usage by the ssh client would be to add the following lines to the 'config' file:
Host 10.11.7.123
KexAlgorithms +diffie-hellman-group1-sha1, diffie-hellman-group14-sha1
Notes:
- This issue/resolution differs from receiving similar errors on attempting to connect to the PSMP Server.
- The local ~/.ssh/config configuration of the specific user, should overwrite those configured in /etc/ssh_config, and/or applied by any crypto policy on the OS.
- When making these changes ensure that the proper permissions on the configuration files are set. Example User:Group: PSMShadowUser:PSMShadowUsers on /home/PSMShadowUser/.ssh/config
- The changes above are not applicable when the ClientApp "Plink" is configured: "{PSPComponentsFolder}/plink [...]" -- Changing an environment prior to v11.7.1 to use the ClientApp "ssh" is not advised, or supported, as various auditing functionality for this client was not added until version v11.7.1+