# How to connect to your OBLAKO VPS via SSH

> How to connect to your OBLAKO VPS over SSH from Windows (PowerShell and PuTTY), macOS and Linux, with screenshots, key login and common errors.

SSH is the standard way to work with a Linux server: you type commands in a terminal on your computer and they run on the server.

## Find the IP and password

1. Open **Servers** in [my.oblako.sh](https://my.oblako.sh) and select a server with the status **Running**.
2. The IP is on the **IP Addresses** tab.
3. The **Root Password** is in the server card.

The same details come in the **Server is ready** email together with a ready SSH command.

In the screenshots below `203.0.113.25` is an example. Use the IP of your own server instead.

## Windows

### Built-in SSH in PowerShell

Windows 10 and 11 already include an SSH client, there is nothing to install.

1. Press **Win + X** and choose **Terminal** (**Windows PowerShell** on Windows 10). You can also search for **PowerShell** in the **Start** menu.
2. Run:

   ```bash
   ssh root@YOUR_SERVER_IP
   ```

3. On the first connection SSH asks whether you trust the server. Type `yes` and press Enter.
4. Paste the password with a right click or **Ctrl + V** and press Enter. The password is not displayed while you type, this is normal.

When you see the `root@...:~#` prompt, you are on the server.

![Connecting to the server over SSH in Windows PowerShell](https://oblako.sh/wiki/img/ssh/windows-powershell.webp)

If PowerShell says the `ssh` command is not found, turn the client on: **Settings** > **Apps** > **Optional features** > **Add a feature** > **OpenSSH Client**. Then open a new PowerShell window.

### PuTTY

If you prefer a graphical client, download [PuTTY](https://www.putty.org) and start it.

1. Enter the server IP in **Host Name (or IP address)**, keep port **22** and connection type **SSH**. Click **Open**.

   ![PuTTY Configuration window with the server IP in Host Name](https://oblako.sh/wiki/img/ssh/putty-config.webp)

2. On the first connection PuTTY warns about the server key. Click **Accept** to remember the server.

   ![PuTTY Security Alert window with the server key](https://oblako.sh/wiki/img/ssh/putty-alert.webp)

3. At `login as:` type `root` and press Enter, then paste the password with a right click and press Enter again.

   ![Successful login to the server in PuTTY](https://oblako.sh/wiki/img/ssh/putty-session.webp)

To avoid typing the IP every time, enter a name in **Saved Sessions** and click **Save** before you click **Open**.

## macOS

1. Open **Terminal**: press **Cmd + Space**, type `Terminal` and press Enter. It is also in **Applications** > **Utilities**.
2. Run:

   ```bash
   ssh root@YOUR_SERVER_IP
   ```

3. When asked whether you trust the server, type `yes` and press Enter.
4. Paste the password with **Cmd + V** and press Enter. Nothing is displayed while you type.

![Connecting to the server over SSH in macOS Terminal](https://oblako.sh/wiki/img/ssh/macos-terminal.webp)

## Linux

1. Open a terminal. On Ubuntu and most GNOME distributions press **Ctrl + Alt + T**.
2. Run:

   ```bash
   ssh root@YOUR_SERVER_IP
   ```

3. When asked whether you trust the server, type `yes` and press Enter.
4. Paste the password with **Ctrl + Shift + V** and press Enter.

![Connecting to the server over SSH in the Ubuntu terminal](https://oblako.sh/wiki/img/ssh/linux-terminal.webp)

If there is no `ssh` command, install the client: `sudo apt install openssh-client` on Ubuntu and Debian or `sudo dnf install openssh-clients` on Fedora.

## Log out of the server

Type `exit` or press **Ctrl + D**. The server keeps running, only your session closes.

## Update the system

Install updates first. Ubuntu and Debian:

```bash
apt update && apt upgrade -y
```

AlmaLinux, Rocky Linux and CentOS:

```bash
dnf upgrade -y
```

## Log in with a key instead of a password

Servers on the internet are constantly scanned by bots guessing passwords. A key is practically impossible to guess.

1. Create a key on your computer if you do not have one:

   ```bash
   ssh-keygen -t ed25519
   ```

2. Copy the public key to the server:

   ```bash
   ssh-copy-id root@YOUR_SERVER_IP
   ```

   On Windows, where `ssh-copy-id` is missing, run:

   ```bash
   type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh root@YOUR_SERVER_IP "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
   ```

   ![Creating an SSH key and copying it to the server](https://oblako.sh/wiki/img/ssh/ssh-keygen.webp)

3. Check that `ssh root@YOUR_SERVER_IP` logs you in without a password.
4. Only then disable password login: set `PasswordAuthentication no` in `/etc/ssh/sshd_config` and restart SSH:

   ```bash
   systemctl restart ssh || systemctl restart sshd
   ```

> **Keep a way back in.** Do not close your current session until key login works in a new window. If you lock yourself out, use the **Console** tab, see [managing your server](https://oblako.sh/wiki/en/server-management/manage-your-server).

## Common errors

| Error | What to check |
|---|---|
| `Connection timed out` | The server is not **Running** yet, or it is **Suspended** because it was not renewed, see [expired servers](https://oblako.sh/wiki/en/billing/expired-servers) |
| `Connection refused` | SSH is not running or uses another port. Check through the **Console** tab |
| `Permission denied` | Wrong password. Copy it again without extra spaces, or generate a new one on the **Password** tab |
| `REMOTE HOST IDENTIFICATION HAS CHANGED` | The server was reinstalled or the IP belonged to another server. Run `ssh-keygen -R YOUR_SERVER_IP` and connect again |
