# Connect to your VM (Linux) Instance using an SSH Client

You can connect to your VM instance using an SSH client. However, it varies depending on your operating system.

* Linux: Search **Terminal** or press **CTRL+ALT+T**.
* macOS: Search **Terminal**.
* Windows: Search **Bash**. If you do not have it installed, use **PuTTY** instead.

Follow these steps to connect to your VM:

1. Open the terminal window on your local computer and enter the SSH connection command below. After the `@`, add the [<mark style="color:blue;">IP address</mark>](https://docs.ionos.com/cloud/support/general-information/glossary-of-terms#ip-address) of your VM instance. Next, press **ENTER**.

{% tabs %}
{% tab title="Bash" %}

```bash
ssh root@192.0.2.1
```

{% endtab %}
{% endtabs %}

For a private key, ensure that you have the location of the private key (.pem file), the username, and the public DNS name. Enter the following command:

```bash
ssh -i /path/key-pair-name.pem instance-username@instance-public-dns-name
```

{% hint style="info" %}
**Note:** — When you log in for the first time, your local machine does not recognize the server, so you will be prompted to continue the connection. You can type **yes** and then press **ENTER**.
{% endhint %}

2. Authentication is the next step in the connection process. You will be able to connect to the VM immediately if you have added the SSH keys or after entering your key pair's passphrase.

If you have not already added SSH keys, you will be prompted for your password:

{% tabs %}
{% tab title="Bash" %}

```bash
root@192.0.2.1's password:
```

{% endtab %}
{% endtabs %}

The terminal remains empty for you to paste the initial password into. Pasting into text-based terminals is different from desktop applications. It is also different from one window manager to another:

* For Linux Gnome Terminal, use **CTRL+SHIFT+V**.
* For macOS, use the **SHIFT-CMD-V** or a middle mouse button.
* For Bash on Windows, right-click on the window bar, choose **Edit**, then **Paste**. You can also right-click to paste if you enable the **QuickEdit** mode.

3. Press **ENTER** after you enter the password.

**Result:** You can log in to your VM instance if the SSH key is configured correctly.
