Skip to main content
Question

PasswordSafe SSH Session - auto-login to sudo mode

  • August 25, 2025
  • 1 reply
  • 42 views

Forum|alt.badge.img+1

Hello! Is there a way to achieve auto-login to sudo mode without  entering the password when logging in via PasswordSafe.

I see there is a different workflow for login-account where commands & password are injected after SSH session is initiated e.g. Launch ssh session as login-account and then switch to root . 

Is there any way to configure PasswordSafe such that a managed-account logs in over SSH and a predefined sudo command is run , Passwordsafe injects the password for same account so that user doesn’t have to go back to browser where PasswordSafe is open , go back to open request or create one for password, copy the password, make sure they clicked inside SSH session, and then paste the password. 


I see an alternative is to allow sudo commands to run passwordless on managed systems. I think this is less secure approach than the above. 

 

1 reply

  • BeyondTrust Employee
  • September 16, 2025

Hello ​@bt101 

Currently password safe is not able to perform inline credential injection after login. 

As you mentioned you could use a low privilege account to ssh into the box (Login Account) then switch to run or another NOPASSWD account. 
Or you could make the password available to the user to type in when needed with sudo.
Using NOPASSWD for specific commands and "session only access from Password Safe" would be more secure than giving the *nix administrator access to the managed account password.

For finer control over sudo elevation BeyondTrust does have "Privilege Management for Unix and Linux" onPrem and cloud that can centralize elevation based on policy. 

You can find the EPML doc’s here if your interested.

Welcome to Endpoint Privilege Management for Linux (EPM-L) | EPM-L

 

Regards,

John