# How to connect to your VPS via SSH

> Find your server IP and root password in the DataPasa panel and connect over SSH from Windows, macOS or Linux. Includes key login and first security steps.

Your new DataPasa server has no desktop to click through. You control it remotely over SSH, an encrypted terminal connection available on every modern computer. Below: where to get the login details, the command to run on your system, and what to do in the first few minutes.

## Find the IP address and root password

Both are in the control panel:

1. Go to [cloud.datapasa.com](https://cloud.datapasa.com), then **Cloud Servers**.
2. Check that the status reads **ACTIVE**. Until then the machine will not answer.
3. Take the address from the **IP** column.
4. Reveal or copy the password in the **Root password** column.

We never email this password, so the panel is the only place to look.

## Connect from macOS or Linux

Start **Terminal** and enter:

```bash
ssh root@YOUR_SERVER_IP
```

A first connection brings up a question about the server fingerprint. Answer `yes`, then paste the password. Seeing no characters appear as you paste is expected.

## Connect from Windows

Windows 10 and 11 ship with an SSH client, so nothing needs installing. In **PowerShell** or **Windows Terminal** the command is identical:

```bash
ssh root@YOUR_SERVER_IP
```

Would rather use a window with fields? In [PuTTY](https://www.putty.org), put the IP into **Host Name**, leave the port at 22, press **Open** and sign in as `root`.

## Update the system

Your first job on a fresh machine is installing pending updates. For Ubuntu or Debian:

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

For AlmaLinux, Rocky Linux or CentOS:

```bash
dnf upgrade -y
```

## Log in with an SSH key instead of a password

Any public IP gets constant login attempts from automated scanners, and a weak password is what they hope to find. Switching to a key removes that risk. The steps below are the quick path, and [how to set up SSH keys](https://datapasa.com/wiki/server-management/set-up-ssh-keys) covers the details.

1. Generate a key pair on your own computer, unless you already have one:

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

2. Install the public part on the server:

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

   Windows has no `ssh-copy-id`, so use this in PowerShell:

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

3. Connect again. No password prompt means the key works.
4. Now turn passwords off: change `PasswordAuthentication` to `no` in `/etc/ssh/sshd_config`, then apply it:

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

> **Test before you log out.** Leave your existing session open and try the key from a second window. Locked out anyway? The console in [VMmanager](https://datapasa.com/wiki/server-management/manage-server-in-vmmanager) still lets you in.

## Common connection errors

| Error | What it usually means |
|---|---|
| `Connection timed out` | Provisioning has not finished, or the status is **SUSPENDED** after the balance reached zero. See [hourly billing](https://datapasa.com/wiki/billing/hourly-billing). |
| `Connection refused` | Nothing is listening on port 22. Use the VMmanager console to look at the SSH service and its port. |
| `Permission denied` | The password did not match. Copy it from the panel once more and watch for stray spaces. |
| `REMOTE HOST IDENTIFICATION HAS CHANGED` | Your computer remembers a different server at this IP. Clear the old entry with `ssh-keygen -R YOUR_SERVER_IP` and retry. |
