# Connect to a Linux device

Depending on your purpose, you can choose among the following methods to remotely connect to your Linux computer over Meshnet:

* GUI-based remote connection using Remote Desktop Protocol (RDP) or Virtual Network Connection (VNC). This method is described further in this article.
* Text-based remote connection using Secure Shell (SSH). For instructions on this method, see the [How to access remote systems over Meshnet using SSH](https://meshnet.nordvpn.com/~/changes/5hiVtBuK6qwLGxb0SjCm/how-to/remote-access/access-remote-systems-over-ssh) article.

## Before you begin

* Ensure that your remote PC and the device you want to use to access it are [linked over Meshnet](https://meshnet.nordvpn.com/~/changes/5hiVtBuK6qwLGxb0SjCm/getting-started/how-to-start-using-meshnet).
* Look up the Nord name or Meshnet IP address of the computer you're connecting to by entering the following command in the terminal:<br>

  ```bash
  nordvpn meshnet peer list
  ```

## Enable remote access on your PC  <a href="#enable-remote-access-on-your-pc.1" id="enable-remote-access-on-your-pc.1"></a>

{% hint style="info" %}
**Note**

For the instructions provided in this guide, Ubuntu 22.04.1 LTS is used as an example.
{% endhint %}

1. Do one of the following:
   * Click the **Activities** button in the upper-left corner of the screen, start typing *sharing*, and then select **Sharing** from the results list.
   * Open the terminal and enter the `gnome-control-center sharing` command.
2. Turn on the **Sharing** toggle in the upper-right corner of the window.
3. Click **Remote desktop**.
4. Turn on the **Remote desktop** toggle to allow remote connections to this computer.
5. Select the **Enable legacy VNC protocol** checkbox if you want to enable VNC connections.
6. Turn on the **Remote control** toggle to allow remote connections to control the desktop.

Also, under **Authentication**, take note of the username and password required to access this computer remotely. You can change the password generated by the app if you wish. \
\
![Looking up the username and password of the remote computer](https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FWx7knTBJ6zqXPooGFYsd%2Fimage.png?alt=media\&token=c24de281-58cf-4b5a-b6c2-3ea9c75d12a3)

## Install a remote desktop client

Once you have enabled remote access and have your remote desktop credentials, you can connect to your PC using a remote desktop client.

{% tabs %}
{% tab title="From Linux" %}
You can use Remmina to work remotely with Linux resources, apps, and desktops from another Linux device. Remmina is a free remote desktop client for Linux, available in the default repositories of many Linux distributions.

{% hint style="info" %}
**Note**

The instructions below apply primarily to Ubuntu 16.04 LTS or above, but if you use a different distribution of Linux, the procedure should remain similar.
{% endhint %}

If you don't have Remmina installed on your system, install it using one of the methods described below.

**Method 1: Install Remmina from the terminal**

1. Open the terminal.

2. Update the package manager's list of available packages by running the following command:<br>

   ```bash
   sudo apt update
   ```

3. Install Remmina by entering this command:<br>

   ```bash
   sudo apt install remmina remmina-plugin-vlc
   ```

**Method 2: Install Remmina from Ubuntu Software**

1. Open the Ubuntu Software app.
2. In the search bar, enter `remmina` and select the matching result. <br>

   <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FZzpYQCyfScgIcDOtnLUm%2Fimage.png?alt=media&#x26;token=5999a7fe-4415-4480-9f6a-24d2532679b1" alt="Entering Remmina in the search bar of Ubuntu Software"><figcaption></figcaption></figure></div>
3. Click **Install**.

### Set up a remote connection <a href="#set-up-a-remote-connection.3" id="set-up-a-remote-connection.3"></a>

1. Open the Remmina app by going to **Show applications** and searching for *remmina*.
2. Click the New connection profile<img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2Fhj3aiNryA4uisTjS114f%2Fimage.png?alt=media&#x26;token=3590fe73-7f35-4d05-877d-dbad370a7c50" alt="" data-size="line"> button in the upper-left corner of the application window.
3. Under **Basic**, enter the information to create a reusable connection.
   * **Server:**  the Nord name or Meshnet IP of the PC you want to access
   * **Username:** your remote PC account name that you recorded earlier
   * **Password:** the password for the specified username<br>

     <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FAzOv4IGXrEkEYm3ZfdLz%2Fimage.png?alt=media&#x26;token=c6108a25-9be4-4990-9ba8-d2ffaace64e5" alt="Filling in the Server, Username and Password boxes"><figcaption><p><br></p></figcaption></figure></div>
4. Click **Save**.
5. Accept the certificate presented by the server to verify that you trust the computer you are trying to access.

The new connection will appear in the Remmina window. You can double-click it whenever you want to initiate a remote desktop session.
{% endtab %}

{% tab title="From macOS" %}
To connect from a Mac to a Linux device, you can use the [Microsoft Remote Desktop](https://apps.apple.com/app/microsoft-remote-desktop/id1295203466?mt=12) client, available for free from the Mac App Store.

Despite being originally designed to enable connections between Windows systems, now it can be used to connect to a wide range of devices.

### Set up a remote connection <a href="#set-up-a-remote-connection.4" id="set-up-a-remote-connection.4"></a>

After you've installed the client, it's time to add a PC:

1. Open **Microsoft Remote Desktop**, click the plus (+) button, and select **Add PC**.
2. In the **PC name** box, type either the Nord name or Meshnet IP of the PC you want to access.\
   \
   ![Entering the Nord name or Meshnet IP of the PC you're accessing](https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FndbiyhybiAO8jKFfyslZ%2Fimage.png?alt=media\&token=d6ad2cc5-0e9b-4818-94d7-8314e95adb9d) <br>
3. Select **Add user account** from the **User account** dropdown list.
4. In the dialog that appears, enter your credentials for the remote computer to save for use with this connection.
   * **Username:** your remote PC account name you recorded earlier
   * **Password:** the password for the specified username<br>

     ![Entering your remote PC username and password](https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FVpq907So6liNKpNQSmCJ%2Fimage.png?alt=media\&token=1fe40cdc-55fd-497c-8e85-0ac4cb083bac)<br>
5. Optionally, you can give a nickname to your connection in the **Friendly name** box. It is a way to easily identify your Remote Desktop connections.
6. Click **Add** to save changes, and then click **Add** again.

### Access your remote PC <a href="#connect-to-your-remote-pc.2" id="connect-to-your-remote-pc.2"></a>

1. Double-click the saved connection that you added.
2. You may receive a warning indicating that the digital certificate of the computer you're trying to access cannot be verified. When connecting to a trusted computer, such as one on your Meshnet, click **Continue**.

{% hint style="success" %}
**Tip**

If you don't want to see this dialog in the future, click **Show certificate**, and then select the **Always trust** checkbox.
{% endhint %}

You should now be able to access and control your PC remotely.
{% endtab %}

{% tab title="From Windows" %}
To connect from a Windows computer to a Linux device, you can use the [Microsoft Remote Desktop](https://apps.microsoft.com/store/detail/microsoft-remote-desktop/9WZDNCRFJ3PS) client available for free from the Microsoft Store.

While Microsoft Remote Desktop was originally developed to allow connections between two Windows systems, now it can be used to connect to a wide range of devices.

{% hint style="success" %}
**Tip**

Alternatively, you can use the built-in Remote Desktop client on Windows, which you can find by typing `Remote Desktop Connection` in the search box on the taskbar.
{% endhint %}

### Set up a remote connection <a href="#set-up-a-remote-connection.5" id="set-up-a-remote-connection.5"></a>

1. Open the **Remote Desktop** app, click the **Add** button, and select **PCs**.
2. In the **PC name** field, type either the Nord name or Meshnet IP of the PC you want to access.\
   \
   ![Entering the Meshnet IP of the PC you want to access.](https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FPe64ZOL4RR5BO79bUEyv%2Fimage.png?alt=media\&token=07a731ec-c1b5-4992-b5ce-6f50da647891)

   &#x20;
3. Click the plus (+) button to add a user account.
4. Enter your credentials for the remote computer to save for use with this connection.
   * **Username:** your remote PC account name you recorded earlier
   * **Password:** the password for the specified username\
     \
     ![Entering your remote PC username and password](https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FyVgs1Geq9fupQLWr0oo7%2Fimage.png?alt=media\&token=7c351792-ccc8-4115-ab3c-b4022e0a0daf)

     &#x20;
5. Optionally, you can give a nickname to your connection in the **Display name** field. It is a way to easily identify your Remote Desktop connections.
6. Click **Save**.

### Access your remote PC <a href="#connect-to-your-remote-pc.3" id="connect-to-your-remote-pc.3"></a>

1. Under **Saved PCs**, double-click the connection that you added.<br>

   <div align="left"><figure><img src="https://3559400189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0cTezbT2vN0lurEio8Z5%2Fuploads%2FmvLBALqxj6rI38V8CWJM%2Fimage.png?alt=media&#x26;token=981262cd-45c5-4a93-84f8-6b56526e297a" alt="Pointing to the added connection"><figcaption></figcaption></figure></div>
2. You may receive a warning message indicating that it might not be safe to connect to this computer. When connecting to a trusted computer, such as one on your Meshnet, click **Connect anyway**.

{% hint style="success" %}
**Tip**

If you don't want to see this dialog in the future, select the **Don't ask about this certificate again** checkbox.
{% endhint %}

You should now be able to access and control your PC remotely.
{% endtab %}
{% endtabs %}

## See also

* [Connect to a macOS device](https://meshnet.nordvpn.com/~/changes/5hiVtBuK6qwLGxb0SjCm/how-to/remote-access/log-in-to-pc-remotely/connect-to-macos)
* [Connect to a Windows device](https://meshnet.nordvpn.com/~/changes/5hiVtBuK6qwLGxb0SjCm/how-to/remote-access/log-in-to-pc-remotely/connect-to-windows)
