> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/connect-with-su-user-in-ssh-sessions.md).

# Connect with su-user in SSH sessions

The Unix command ***su***, derived from ***substitute user***, grants a user the ability to execute commands with the privileges of another user account.

### Connect with su-user in SSH sessions

1. In Remote Desktop Manager, open your SSH entry's ***Properties.***
2. Go to ***Security settings*** and tick the ***Allow password in variable*** checkbox.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>If the option is greyed out, you need to activate <em><strong>Allow password variables for all entries</strong></em> and <em><strong>Allow password variable in macros</strong></em> in <em><strong>Administration</strong></em> – <em><strong>System settings</strong></em> – <em><strong>Password settings</strong></em>. Also, note that if you are using either of the <em><strong>Linked (vault)</strong></em> or <em><strong>Linked (external vault)</strong></em> credential modes for your entry, you will need to tick the <em><strong>Allow password in variable</strong></em> box in the linked vault entry as well.</p></div>
3. Then, head to ***General*** – ***Post login***, and click on ***New*** (cross-shaped button).

![](https://cdnweb.devolutions.net/docs/docs_en_kb_KB6030.png)

3. Enter `sudo su` in the ***Macro edition*** window. An ***Expected prompt*** is not required because we want to execute it as soon as possible in this scenario.
4. Go back to ***General*** – ***Post login***, and click on ***New*** (cross-shaped button).
5. Enter the variable `$PASSWORD$` and `[sudo] password for username:` in the ***Expected prompt*** (***username*** is used as an example).&#x20;
6. Define a ***Timeout.*** and click ***OK*** to close the window.

![](https://cdnweb.devolutions.net/docs/docs_en_kb_KB6034.png)

The objective is to ensure the password is sent only when the timing is right with the intended sequence of actions. The terminal awaits the `[sudo] password for username:` prompt before sending the second command.

![](https://cdnweb.devolutions.net/docs/docs_en_kb_KB6033.png)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devolutions.net/rdm/knowledge-base/how-to-articles/connect-with-su-user-in-ssh-sessions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
