> 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/it/knowledge-base/how-to-articles/connect-with-su-user-in-ssh-sessions.md).

# Connettersi con su-user nelle sessioni SSH

Configuri le macro post-login in una voce SSH in Remote Desktop Manager per passare automaticamente a un su-user durante la sessione.

Il comando Unix ***su***, derivato da ***substitute user***, consente a un utente di eseguire comandi con i privilegi di un altro account utente.

### Connettersi con su-user nelle sessioni SSH

1. In Remote Desktop Manager, apra le ***Proprietà*** della sua voce SSH.
2. Vada in ***Impostazioni di sicurezza*** e selezioni la casella ***Consenti password nella variabile***.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Se l'opzione è disattivata, deve attivare <em><strong>Consenti variabili password per tutte le voci</strong></em> e <em><strong>Consenti variabile password nelle macro</strong></em> in <em><strong>Amministrazione</strong></em> – <em><strong>Impostazioni di sistema</strong></em> – <em><strong>Impostazioni password</strong></em>. Inoltre, tenga presente che se utilizza una delle modalità di credenziali <em><strong>Collegata (cassaforte)</strong></em> o <em><strong>Collegata (cassaforte esterna)</strong></em> per la sua voce, dovrà selezionare la casella <em><strong>Consenti password nella variabile</strong></em> anche nella voce della cassaforte collegata.</p></div>
3. Poi, vada in ***Generale*** – ***Post login*** e clicchi su ***Nuovo*** (pulsante a forma di croce).
4. Inserisca `sudo su` nella finestra ***Modifica macro***. Un ***Prompt previsto*** non è necessario perché in questo scenario vogliamo eseguirlo il prima possibile.
5. Torni in ***Generale*** – ***Post login*** e clicchi su ***Nuovo*** (pulsante a forma di croce).
6. Inserisca la variabile `$PASSWORD$` e `[sudo] password for username:` nel ***Prompt previsto*** (***username*** è usato come esempio).
7. Definisca un ***Timeout*** e clicchi su ***OK*** per chiudere la finestra.

L'obiettivo è garantire che la password venga inviata solo al momento giusto, con la sequenza di azioni prevista. Il terminale attende il prompt `[sudo] password for username:` prima di inviare il secondo comando.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
