Automatic privilege escalation when connecting via SSH
Normally, you cannot log in directly over SSH using the root account. Therefore, after connecting, you usually run the su command and enter the root password to escalate privileges.
JumpServer allows you to automate this process and start an SSH session with automatic privilege escalation to root without knowing or exposing the root password.
To configure this:
-
Go to System Settings → Platforms, select the required Linux-based platform (or copy the default one), open its settings, and in the Switch Account Method field specify the command to be used for switching accounts — for example,
su -. -
Navigate to Console → Accounts, find the privileged account (for example,
root), open it for editing, and in the Switch from field specify the user account (in this example,serg) from which the initial connection will be made. Save the changes. -
Now, when connecting via SSH, you can select root, but the session will start under the
sergaccount and automatically switch to root after authentication. At the start of the session, you will see the message "switched to root(root)".


