---
title: "Connect to a VDS server"
sidebar_label: "Connect to a server"
sidebar_position: 1
description: "How to connect to a VDS server via SSH, RDP, and the console in the control panel"
---

import TerminalIcon from '@selectel/docux/icons/terminal'
import CopyIcon from '@selectel/docux/icons/copy'
import Formbricks from '@theme/MDXComponents/Formbricks'
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import {TabItemLabel} from '@selectel/docux/components'

# Connect to a VDS server

You can connect to a VDS server:

* via [SSH protocol](#connect-via-ssh) — for servers with the Linux operating system;
* [RDP protocol](#connect-via-rdp) — for servers with the Windows operating system; ;
* [via the console in the control panel](#connect-through-console) — for servers with any operating system.

## Viewing connection settings \{#view-connection-parameters}

You can view the settings for connecting to a VDS server in the [control panel](https://my.selectel.ru/vds/default/servers/):

* public IP address — from the top menu, click **Products** → **VDS servers** → server row; ;
* username (login) and password — from the top menu, click **Products** → **VDS servers** → server page → tab **Console** → **Login** and **Password fields**.

If you have forgotten your server password, you can reset it. To do this, [rebuild the server](/vds-servers/manage/manage-server.mdx#rebuild-server).

## Connecting via SSH \{#connect-via-ssh}

The SSH protocol is used to connect to VDS servers running Linux.

You can use an SSH key pair to connect to a server. We recommend using SSH keys instead of a username and password—you can only connect using keys from the computer where the private key is stored.

Public SSH keys can be stored in the control panel; to do this, [add public SSH keys to your user profile](/access-control/manage/edit-user-data-or-role.mdx#add-ssh-key).

<Tabs queryString="connect-via-ssh">
  <TabItem value="linux">
    <TabItemLabel>
      From Linux/macOS
    </TabItemLabel>

    1. Optional: add an SSH key when [creating a VDS server](/vds-servers/create-server.mdx).

    2. Open the CLI.

    3. Connect to the server:

       ```bash
       ssh <username>@<ip_address>
       ```

       Specify:

       * `<username>` — username (login). You can view it in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page → tab **Console** → field **Login**;
       * `<ip_address>` — public IP address of the server. You can view it in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page.

    4. Enter the password. If the password is lost, you can generate a new one in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page → **Console** tab → in the **Password** field, click **Generate new**.

    If you are using an SSH key pair, you do not need to enter a password.
  </TabItem>

  <TabItem value="windows">
    <TabItemLabel>
      From Windows
    </TabItemLabel>

    In Windows 10, you can connect to the server just like in Linux and macOS — via the command line `cmd.exe`.

    For older versions of Windows, use PuTTY.

    1. Optional: add an SSH key when creating a VDS.

    2. Install PuTTY and launch it.

    3. Open the **Session** tab.

    4. In the **Host Name** field, enter the public IP address of the server. You can view it in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page.

    5. In the **Port** field, specify the port for the SSH connection (default is `22`).

    6. In the **Connection type** field, select the SSH connection type.

    7. If you are using an SSH key pair, upload the file with the private key:

       7.1. Open the **Connection** → **SSH** → **Auth** → **Credentials**.

       7.2. In the **Private key file for authentication** field, click **Browse**.

       7.3. Upload the file with the private key.

    8. Click **Open**.

    9. Confirm the connection:

       9.1. Enter the login. You can view it in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page → **Console** tab → **Login**.

       9.2. Enter the password to access the server. If you have lost your password, you can generate a new one in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page → **Console** → in the **Password** field, click **Generate new**.

       If you are using an SSH key pair, you do not need to enter a password.
  </TabItem>
</Tabs>

### Fixing an error during reconnection \{#fix-reconnecting-error}

If you use SSH keys to connect, the SSH key is saved to the `~/.ssh/known_hosts` file the first time you authorize on the server. If you reconnect, the `REMOTE HOST IDENTIFICATION HAS CHANGED.` error may appear.

1. Open the CLI on your local computer.

2. To fix the error:

   * delete host information by IP address:

     ```bash
     ssh-keygen -f "/home/root/.ssh/known_hosts" -R "<ip_address>"
     ```

   * or connect to the server using the command:

     ```bash
     ssh -o UserKnownHostsFile=/dev/null root@<ip_address>
     ```

   Specify `<ip_address>` — the public IP address of the server. You can view it in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page.

## Connecting via RDP \{#connect-via-rdp}

The RDP protocol is used for connecting to VDS servers running Windows.

<Tabs queryString="connect-via-rdp">
  <TabItem value="linux">
    <TabItemLabel>
      From Linux
    </TabItemLabel>

    1. Install an RDP client — for example, rdesktop or Remmina. Read more in the Selectel blog article [RDP remote access clients for Linux](https://selectel.ru/blog/rdp-clients-for-linux/).

    2. Open the CLI.

    3. Connect to the server using an RDP client. Example command for `rdesktop`:

       ```bash
       rdesktop <ip_address> -u <username> -p <password>
       ```

       Specify:

       * `<ip_address>` — the public IP address of the server. You can copy it in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → in the server row, click <CopyIcon /> next to the IP address;
       * `<username>` — the username (login). You can copy it in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page → **Console** tab → in the **Login** field, click <CopyIcon />;
       * `<password>` — the password you saved when [creating the server](/vds-servers/create-server.mdx). If you have lost your password, you can generate a new one in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page → **Console** tab → in the **Password** field, click **Generate new**.
  </TabItem>

  <TabItem value="macos">
    <TabItemLabel>
      From macOS
    </TabItemLabel>

    1. Install [Microsoft Remote Desktop](https://itunes.apple.com/ru/app/microsoft-remote-desktop/id1295203466) and launch it.

    2. To create a connection, click **+**.

    3. In the **PC name** field, enter the public IP address of the server. You can copy it in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → in the server row, click <CopyIcon /> next to the IP address.

    4. In the **Username** field, enter the username. You can copy it in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page → **Console** tab → in the **Login** field, click <CopyIcon />.

    5. In the **Password** field, enter the password you saved when [creating the server](/vds-servers/create-server.mdx). If you have lost your password, you can generate a new one in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page → **Console** tab → in the **Password** field, click **Generate new**.

    6. Click **Save**.

    7. Double-click the created connection in the list.
  </TabItem>

  <TabItem value="windows" default>
    <TabItemLabel>
      From Windows
    </TabItemLabel>

    1. Open the **Start** menu → **Remote Desktop Connection**.

    2. In the **Computer** field, enter the public IP address of the server. You can copy it in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → in the server row, click <CopyIcon /> next to the IP address.

    3. Click **Connect**.

    4. Enter the username. You can copy it in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page → **Console** tab → in the **Login** field, click <CopyIcon />.

    5. Enter the password you saved when [creating the server](/vds-servers/create-server.mdx). If you have lost your password, you can generate a new one in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page → **Console** tab → in the **Password** field, click **Generate new**.

    6. Click **OK**.
  </TabItem>
</Tabs>

## Connect via the console in the control panel \{#connect-through-console}

You can connect to a VDS server with any operating system via the console in the control panel.

The console is a browser-based VNC client. We recommend using it only in cases where it is impossible to connect to the server via SSH or RDP. You cannot copy text from the console, but you can paste text using the **Ctrl+V**.

1. In the [control panel](https://my.selectel.ru/vds/default/servers/), from the top menu, click **Products** and select **VDS servers**.

2. Open the server page → **Console**.

3. Enter the username (login). You can view it in the **Login** field above the console.

4. Enter the password. If you have lost your password, you can generate a new one in the [control panel](https://my.selectel.ru/vds/default/servers/): from the top menu, click **Products** → **VDS servers** → server page → **Console** tab → in the **Password** field, click **Generate new**.

<Formbricks />
