PSMP known_hosts file

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 known_hosts file

L3 Networker

What happens to the known_hosts file when it is deleted daily? Does it affect performance? And what happens to active sessions, given that it stores the fingerprints of the destination servers? What is the correct way to delete it when I have a fingerprint error in PSMP?

5 REPLIES 5

L5 Sessionator

Hey @William Shinin​ If using 14.2+, you can leverage the recommended method to use the ServerHostKeyNotInCacheBehavior=4 parameter in basic_psmpserver.conf to manage the issue:

https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasimp/configuring-the-verification-of-a...

 

♦If you're not on a version that supports that option, or you prefer to manage in manually - you can refer to these options:

A) Remove this file. It will be created again, and the ssh host keys will be cached as if this was the first time connecting to the target.

B) Update/edit the file, and remove the line with the corresponding IP/FQDN/Hostname of the target server, and it will be updated with the new SSH Host Key, on next connection.

C) Update the Fingerprint/SSH Host Key, for the corresponding line of the target server, in the correct format as noted above.

 

https://community.cyberark.com/s/article/00004310

L4 Transporter

There is currently an issue with ServerHostKeyNotInCacheBehavior=4 when SELinux is in enforcing mode.

You'll get error like:

Failed to add the host to the list of known hosts (/home/PSMShadowUser/.ssh/known_hosts.0000000000000xxx).

 

Until it is fixed, the easiest workaround is to go for session separation as each shadow user will have their own home directory.

https://docs.cyberark.com/pam-self-hosted/latest/en/content/pasimp/psm_for_ssh_session_separation.htm

 

@Pierre-Yves Uytdenhoef​ I believe the issue you're referring to is a bug in setups with non-standard SELinux contexts. However, that known issue is resolved in PSMP 14.6.

 

Thanks for the feedback @Patrick Booth​ 

We are indeed still running on v14.2. And indeed we had to create a SELinux with more permissions for storing the recordings on an external storage.

Coming back to the known_hosts file problem, the only feedback we got from R&D so far is that the root cause are incorrect SELinux labels on the `.ssh` directory and the `errors` path under `/home/PSMShadowUser/`. They did not mention any permanent fix in v14.6+.

@Pierre-Yves Uytdenhoef​ I believe you are actually speaking about a different issue (not fixed yet). I created an article for the issue you are referring to: https://community.cyberark.com/s/article/KI00025524

 

That issue arises if initial selinux attributes on PSMShadowUser home directory were changed, and restorecon will not restore to correct selinux attributes.

 

The workaround is to manually restore selinux attributes on PSMShadowUser home directory. "chcon -R -t home_root_t /home/PSMShadowUser/.ssh /home/PSMShadowUser/errors

  • 186 Views
  • 5 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!