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
serg account and
automatically switch to root after authentication. At the start of the
session, you will see the message "switched to root(root)".
| << How to connect to domain assets using a single domain account? | Creating Accounts and SSH Keys on the Target System (Push Accounts) >> |
Stuck? If you are running a pilot, write to support@afi-d.com or in your project's Telegram group. Community Edition users can buy a support subscription: see Technical support. Video guides are on our YouTube channel.