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

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

# Connect to a cloud server

You can connect to a cloud server:

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

To be able to connect to a cloud server via SSH or RDP, the server must have internet access:

* [via a public floating IP address and cloud router](/cloud-servers/cloud-networks/configure-access-to-internet.mdx#internet-access-via-floating-ip);
* [via a direct public IP address](/cloud-servers/cloud-networks/configure-access-to-internet.mdx#internet-access-via-direct-ip);
* [via a public subnet](/cloud-servers/cloud-networks/configure-access-to-internet.mdx#internet-access-via-public-subnet).

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

The settings for connecting to a cloud server can be viewed in the [control panel](https://my.selectel.ru/vpc/default/servers/):

* public IP address — from the top menu, click **Products** → **Cloud Servers** → Server page → **Ports** tab → in the port card, click <CopyIcon /> next to the public IP address;
* username (login) and password — from the top menu, click **Products** → **Cloud Servers** → Server page → **Console** tab → **Login** and **Password** fields.

If you have forgotten your server password, you can [reset and recover it](/cloud-servers/troubleshooting/recover-password.mdx).

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

The SSH protocol is used to connect to Linux-based cloud servers.

To connect to a server, you can use an [SSH key pair](/cloud-servers/manage/create-and-place-ssh-key.mdx). We recommend using SSH keys instead of a login and password — you can only connect with 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](/cloud-servers/manage/create-and-place-ssh-key.mdx#add-public-ssh-key-to-profile).

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

    1. Optional: [create an SSH key pair](/cloud-servers/manage/create-and-place-ssh-key.mdx#create-ssh-keys) and [place the public SSH key](/cloud-servers/manage/create-and-place-ssh-key.mdx#place-public-ssh-key) when creating a cloud server or on an existing server.

    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/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Console** tab → **Login** field;
       * `<ip_address>` — public IP address of the server. You can view it in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Ports** tab → in the port card, click <CopyIcon /> next to the public IP address.

    4. Enter the password. You can view it in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Console** tab → **Password** field.

       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 a cloud server in the same way as in Linux and macOS — via the command line (cmd.exe).

    In earlier versions of Windows, use PuTTY.

    1. Optional: [create an SSH key pair](/cloud-servers/manage/create-and-place-ssh-key.mdx#create-ssh-keys) and place the public SSH key on the cloud server: [when creating a server](/cloud-servers/manage/create-and-place-ssh-key.mdx#place-public-ssh-key) or [on an existing server](/cloud-servers/manage/create-and-place-ssh-key.mdx#place-public-ssh-key).

    2. Install [PuTTY](https://www.putty.org/) and launch it.

    3. Open the **Session** tab.

    4. In the **Host Name** field, enter the public IP address of the server.

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

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

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

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

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

       7.3. Upload the file with your private key.

    8. Click **Open**.

    9. Confirm the connection and enter the login and password to access the server. You can view the login and password in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Console** tab → **Login** and **Password** fields.

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

### Error during reconnection \{#reconnecting-error}

If you use SSH keys to connect, the SSH key is saved to the `~/.ssh/known_hosts` file upon your first authorization on the server. When reconnecting, the following error may appear: `REMOTE HOST IDENTIFICATION HAS CHANGED`.

To fix this error:

* remove the host information for that 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>
  ```

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

The RDP protocol is used to connect to Windows-based cloud servers.

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

    1. Install an RDP client — for example, rdesktop or Remmina.  More information is available 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. An example command for `rdesktop`:

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

       Specify:

       * `<ip_address>` — public IP address of the server. You can copy it in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Ports** tab → in the port card, click <CopyIcon /> next to the public IP address;
       * `<username>` — username (login). You can view it in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Console** tab → **Login** field;
       * `<password>` — password. You can view it in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Console** tab → **Password** field.
  </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 view it in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Ports** tab → in the port card, click <CopyIcon /> next to the public IP address.

    4. In the **Username** field, enter the username. You can view it in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Console** tab → **Login** field.

    5. In the **Password** field, enter the password. You can view it in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Console** tab → **Password** field.

    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 view it in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Ports** tab → in the port card, click <CopyIcon /> next to the public IP address.

    3. Click **Connect**.

    4. Enter the username. You can view it in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Console** tab → **Login** field.

    5. Enter the password. You can view it in the [control panel](https://my.selectel.ru/vpc/default/servers/): from the top menu, click **Products** → **Cloud Servers** → Server page → **Console** tab → **Password** field.

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

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

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

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

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

2. In the server row, click <TerminalIcon />.

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

4. Enter the password. You can view it in the **Password** field.

<Formbricks />
