# Connect to your server with SSH

> How to log in to a Linux VPS over SSH from Linux, macOS or Windows, with the SSH key you picked when you ordered it.

Source: https://vpsnine.com/help/connect-with-ssh · Updated: 2026-10-10

You manage a VPSNine server over SSH, from a terminal. New servers have no root password. You log in as root with the SSH key you picked when you ordered, at the IPv4 address the panel shows for the server. The examples use the placeholder `203.0.113.42`; swap in your own.

You can't order a server without a key, so if you don't have one yet, [make one](https://vpsnine.com/help/ssh-keys) and [save it in your account](https://vpsnine.com/help/manage-ssh-keys-in-the-panel) first.

## Linux and macOS

Open a terminal and run:

```bash
ssh root@203.0.113.42
```

The first time, SSH shows the server's key fingerprint and asks if you trust it. Type `yes`. If your key has a passphrase, SSH asks for it. The passphrase unlocks the key on your computer and is never sent to the server.

## Windows

Windows 10 and 11 come with the OpenSSH client already. Open PowerShell or Windows Terminal and run the same command:

```powershell
ssh root@203.0.113.42
```

## First steps once you're in

Update everything first. On Ubuntu and Debian:

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

Then give root a password:

```bash
passwd
```

SSH won't use it; it keeps taking only keys. The password is for the [serial console](https://vpsnine.com/help/serial-console), which is how you get back in if SSH ever breaks. The [first-hour checklist](https://vpsnine.com/help/first-hour-checklist) covers the rest.

## When it won't connect

The error message usually tells you which way to look:

- `Connection refused`: the server is probably still booting. Give it a minute.
- `Connection timed out`: check the address. Then check that nothing on your side blocks port 22 (office and hotel networks sometimes do). If you've turned on a firewall on the server, make sure it allows SSH; see [Set up a firewall with ufw](https://vpsnine.com/help/firewall-with-ufw).
- `Permission denied (publickey)`: the server doesn't have the key SSH offered. If you have more than one key, name the right one with `ssh -i ~/.ssh/id_ed25519 root@203.0.113.42`.
- `REMOTE HOST IDENTIFICATION HAS CHANGED`: normal after a reinstall, because the new system has new host keys. Clear the old one with `ssh-keygen -R 203.0.113.42` and connect again. If you *didn't* reinstall, stop there and [open a support ticket](https://my.vpsnine.com/support/new?category=server).

To see exactly where it stops, add `-v`:

```bash
ssh -v root@203.0.113.42
```

Every server also has a [serial console](https://vpsnine.com/help/serial-console) in the panel that reaches it without going through the network, for the times SSH itself is what's broken. It works once you've set a password with `passwd`.
