> For the complete documentation index, see [llms.txt](https://wiki.datadike.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.datadike.com/sonar/administration/remote-access/remote-control.md).

# Remote control

Take control of a device's desktop from the console: the remote window, what the person at the endpoint sees, multiple displays, clipboard, and the audit record.

## What this is and when to use it

**Take Control** opens a remote window for one device. On a Windows device the window starts on the **Take Control** tab, which shows the device's desktop and lets you use its mouse and keyboard from the browser. The same window holds the other remote tools: **Terminal**, **File Browser**, **Processes**, **Services**, and **Logs**.

Use it when you need to see what the user sees, work through an installer, or fix something that needs the graphical session.

The desktop, terminal, and file sessions run through the **remote access service**, which reaches the device through a second agent installed next to the SONAR agent. The console shows that agent's state separately, as the remote status. The SONAR agent can be online while the remote access agent is offline, and the other way round.

On the endpoint, the remote access agent appears as:

| Platform | Service                                                                 |
| -------- | ----------------------------------------------------------------------- |
| Windows  | The **Mesh Agent** service, installed under `%ProgramFiles%\Mesh Agent` |
| Linux    | `meshagent.service`                                                     |
| macOS    | The `meshagent` launch daemon                                           |

{% hint style="info" %}
The desktop tab exists only for Windows devices. On Linux and macOS devices the remote window opens on **Terminal**, and the **Services** and **Logs** tabs are not shown.
{% endhint %}

## Before you start

* A role with **List Agents** (section **Agents**) and **Use Mesh** (section **System**) in **Admin Center › Roles**. The API checks **Use Mesh** before it opens a session. If your role is limited to some clients or sites, you can open sessions only on devices in those clients and sites.
* The device's remote status is **Remote Online**. It is shown in the header of the device panel.

## Steps

1. Open **Dashboard › Sysadmin**, open a client card or **All clients**, and select the device. The device panel opens under the list.
2. Check the status pills in the panel header. **Remote Online** means you can continue.
3. Click **Take Control** in the panel header. You can also choose **Take Control** in the **Other actions** menu (the ⋮ button in the panel header), or right-click the device row in the list and choose **Take Control**.
4. In the new window, wait for **Loading remote session** to clear.
5. Click **Connect** to start the desktop.
6. Work on the device. Clear **Input** if you want to watch without sending mouse or keyboard input.
7. Click **Disconnect** when you finish, then close the window.

## What you should see

The window title reads `WS-0001 - CLIENT-A - SITE-01 | Remote Background`: the device, its client, and its site. Across the top are the tabs, then two status badges: the SONAR agent status and the remote status, for example **Online** and **Remote online**.

After **Connect**, the status beside the button stops reading **Disconnected** and the device's desktop fills the window.

### Controls in the desktop view

| Control                      | What it does                                                                                                                                                                                                           |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Connect** / **Disconnect** | Starts and ends the desktop session                                                                                                                                                                                    |
| **Connect**, right-click     | **Ask Consent** asks the person at the device before the session starts, **Privacy Bar** shows them the connection bar, and **Ask Consent + Bar** does both, whatever the consent settings of your deployment          |
| **Disconnect**, right-click  | **Disconnect and Lock** ends the session and locks the device's screen                                                                                                                                                 |
| **Input**                    | Turns mouse and keyboard input on or off. Off means view only                                                                                                                                                          |
| Key list and **Send**        | Sends a key combination your own computer would keep for itself. The list includes Ctrl + Alt + Del, Win + L, Win + R, Alt + Tab, and Alt + F4                                                                         |
| **Clipboard**                | Opens the **Remote Clipboard** dialog. **Get Clipboard** copies the endpoint's clipboard text into the box. **Set Clipboard** puts the text in the box on the endpoint's clipboard. Text only, up to 65,535 characters |
| Display icons                | Appear when the endpoint has more than one display. Each icon switches the view to one display, and **All Displays** shows them all at once                                                                            |
| Session time                 | Shows how long the desktop session has been open                                                                                                                                                                       |

When the window opens, your browser may ask whether the page can read the clipboard. Allow it if you want copy and paste to work between your computer and the endpoint.

### What the person at the endpoint sees

The consent settings of the remote access service decide what the person signed in to the device sees. These settings are part of your deployment and are set up with DataDike implementation support. The options are:

| Option                    | What the person at the endpoint sees                                                                                                                                                                                                                                                                     |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Consent prompt            | A window with the message "*name* requesting remote desktop access. Grant access?" and the buttons **Allow** and **Deny**. *Name* is the SONAR user who is connecting. The session starts only after **Allow**. While the prompt is open, your remote window shows "Waiting for user to grant access..." |
| Auto accept, Windows only | The prompt has a third choice, **Auto accept all connections for next 60 minutes**. Once it is chosen, new desktop, terminal, and file sessions from the same SONAR user start without a prompt for 60 minutes. The period ends early if the remote access agent restarts                                |
| Notification              | A system notification: "*name* started a remote desktop session."                                                                                                                                                                                                                                        |
| Connection bar            | A bar on the desktop that reads "Sharing desktop with: *name*" for as long as the session lasts. If the person closes the bar, the remote desktop session ends                                                                                                                                           |

If no consent option is set, the session starts without a prompt and without a notification.

### When the remote status is not online

If the remote access agent is offline, the panel shows **Remote Offline** and **Take Control** is disabled. Its tooltip starts with "You cannot take control of this agent". If the SONAR agent is online at the same time, the panel also shows **Restart Remote Service**, which asks the SONAR agent to restart the remote access agent on the device.

If the remote window is opened while the remote status is anything other than online, it shows **Remote access unavailable**, the two status badges, and a **Close** button. No session starts and no audit record is written.

## How to verify it worked

1. Open the session and click **Connect**. The status beside the button must stop reading **Disconnected**, and the desktop must follow your mouse.
2. In the device panel, open the **Audits** tab. A new entry with the action **Remote Session** must be at the top, with your username, the device, and your IP address under **Client IP**.
3. For the whole environment, open **Reports & Audits › Audits** and filter by the **Remote Session** action.

{% hint style="info" %}
SONAR writes one **Remote Session** record each time the remote window opens for a device, and another each time **Restart Mesh Agent** completes in that window. The record says who opened the window, for which device, when, and from which IP address. One record covers the **Take Control**, **Terminal**, and **File Browser** tabs of that window together. It does not record what was done during the session or when the session ended.
{% endhint %}

## Common errors

| Symptom                                                                                      | Cause                                                                     | Fix                                                                                                                                                                                                                                                 |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Take Control** is disabled, with **Remote Offline** in the panel                           | The remote access agent on the device is not connected                    | If the SONAR agent is online, click **Restart Remote Service**. If it is not, bring the device online first, then check that the **Mesh Agent** service (Windows), `meshagent.service` (Linux), or the `meshagent` launch daemon (macOS) is running |
| **Take Control** in the menu is greyed out, with "You don't have permission for this action" | Your role does not have **Use Mesh**                                      | Ask an administrator to add it in **Admin Center › Roles**                                                                                                                                                                                          |
| The remote window opens but no session loads in any tab                                      | Your role does not have **Use Mesh**                                      | Ask an administrator to add it in **Admin Center › Roles**                                                                                                                                                                                          |
| The window shows **Remote access unavailable**                                               | The remote status was not online when the window opened                   | Close the window, refresh the device panel, and try again when it shows **Remote Online**                                                                                                                                                           |
| Nothing opens after you click **Take Control**                                               | The browser blocked the new window                                        | Allow pop-ups for the console address                                                                                                                                                                                                               |
| The remote window shows "Waiting for user to grant access..." and no desktop appears         | The person at the endpoint has not clicked **Allow**, or clicked **Deny** | Contact the user and try again                                                                                                                                                                                                                      |
| There is no **Take Control** tab in the remote window                                        | The device runs Linux or macOS                                            | Use **Terminal** and **File Browser**                                                                                                                                                                                                               |
| "Unable to contact the agent" after **Restart Remote Service** or **Restart Mesh Agent**     | The SONAR agent did not answer                                            | Wait until the device shows **Online** and try again                                                                                                                                                                                                |

## Field reference

**Device panel header**:

| Element                                                     | What it shows or does                                                                                                                 |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| **Online** / **Overdue** / **Offline**                      | SONAR agent status                                                                                                                    |
| **Remote Online** / **Remote Offline** / **Remote Unknown** | Remote access agent status, read when the panel loads. **Remote Unknown** means the console could not get an answer                   |
| **Take Control**                                            | Opens the remote window. Disabled while the remote status is **Remote Offline**                                                       |
| **Restart Remote Service**                                  | Shown only when the remote status is **Remote Offline** and the SONAR agent is online. Restarts the remote access agent on the device |
| **Other actions** (⋮)                                       | Opens the device action menu. **Take Control** is its first entry                                                                     |

**Remote window, top right**:

| Element                | What it does                                                                                                                                                                      | Available on  |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| Status badges          | SONAR agent status and remote status                                                                                                                                              | All platforms |
| **Restart Connection** | Restarts the **Mesh Agent** Windows service through the SONAR agent. Needs **Manage Windows Services** in your role. Confirms with "Mesh agent service was restarted"             | Windows       |
| **Restart Mesh Agent** | Asks the SONAR agent to stop and start the remote access agent, then reloads the remote tabs. Confirms with "Repaired mesh agent on *device*". Can be used again after 10 seconds | All platforms |
| SONAR logo             | Switches the window between light and dark mode                                                                                                                                   | All platforms |

**Remote window tabs**:

| Tab              | What it opens                                                                                                                                           | Available on  |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| **Take Control** | Remote desktop                                                                                                                                          | Windows       |
| **Terminal**     | Command shell on the device. See [Remote terminal](https://wiki.datadike.com/sonar/administration/remote-access/remote-terminal.md)                     | All platforms |
| **File Browser** | The device's file system. See [Transfer files](https://wiki.datadike.com/sonar/administration/remote-access/file-transfer.md)                           | All platforms |
| **Processes**    | Running processes. See [Processes, services, and event logs](https://wiki.datadike.com/sonar/administration/remote-access/processes-services-events.md) | All platforms |
| **Services**     | Windows services                                                                                                                                        | Windows       |
| **Logs**         | Windows event logs                                                                                                                                      | Windows       |

The **Mesh Central** tab in **Admin Center › Settings** connects the console to the remote access service. It is maintained with DataDike implementation support.

## Related pages

* [Remote terminal](https://wiki.datadike.com/sonar/administration/remote-access/remote-terminal.md) — the command shell in the same window
* [Transfer files](https://wiki.datadike.com/sonar/administration/remote-access/file-transfer.md) — the file browser in the same window
* [Device details](https://wiki.datadike.com/sonar/administration/devices/device-details.md) — the device panel and its status pills
* [Audit trail](https://wiki.datadike.com/sonar/administration/audit/audit-trail.md) — where **Remote Session** records appear
* [Roles and permissions](https://wiki.datadike.com/sonar/administration/identities/roles.md) — **Use Mesh** and the other remote access permissions
