> ## Documentation Index
> Fetch the complete documentation index at: https://docs.digitalfyre.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting via SSH

SSH is the standard method for accessing and managing your VPS. After installing an operating system, you can connect using the credentials set during OS installation.

## Prerequisites

* An OS installed on your VPS — see [Installing an OS](/vps/virtfusion/installing-an-os)
* Your server's IPv4 address — found on your [VPS service page](/vps/getting-started/vps-overview)
* Your root password — set during OS installation, or reset via [Password Resets](/vps/client-portal/password-resets)

## Connecting

<Tabs>
  <Tab title="Linux / macOS">
    Open a terminal and run:

    ```bash lines theme={"theme":{"light":"light-plus","dark":"ayu-dark"}}
    ssh root@YOUR_SERVER_IP
    ```

    Accept the host key on first connection and enter your password when prompted.
  </Tab>

  <Tab title="Windows">
    Windows 10 and later include a built-in SSH client. Open PowerShell or Windows Terminal and run:

    ```bash lines theme={"theme":{"light":"light-plus","dark":"ayu-dark"}}
    ssh root@YOUR_SERVER_IP
    ```

    Alternatively, use [PuTTY](https://putty.org) — enter your server's IP in the **Host Name** field, ensure port `22` and **SSH** are selected, and click **Open**.
  </Tab>
</Tabs>

## Using SSH Keys (Recommended)

SSH keys are more secure than password authentication. To set up key-based login:

**Generate a key pair** if you do not already have one:

```bash lines theme={"theme":{"light":"light-plus","dark":"ayu-dark"}}
ssh-keygen -t ed25519 -C "your-email@example.com"
```

**Copy your public key to the server:**

```bash lines theme={"theme":{"light":"light-plus","dark":"ayu-dark"}}
ssh-copy-id root@YOUR_SERVER_IP
```

**Optionally disable password authentication** after confirming key login works:

```bash expandable lines theme={"theme":{"light":"light-plus","dark":"ayu-dark"}}
nano /etc/ssh/sshd_config

# Set the following:
PasswordAuthentication no
PubkeyAuthentication yes

# Restart SSH
systemctl restart sshd
```

<Warning>
  Verify that key-based login works before disabling password authentication. If you lock yourself out, use the [VNC Console](/vps/client-portal/vnc-console) to regain access.
</Warning>

## Troubleshooting

If you cannot connect:

* **Server stopped** — Check the power state on your [service page](/vps/client-portal/power-management) and start it if needed
* **No OS installed** — A freshly provisioned VPS has no OS. See [Installing an OS](/vps/virtfusion/installing-an-os)
* **Wrong IP** — Confirm the IP from your service page
* **SSH locked out** — Use the [VNC Console](/vps/client-portal/vnc-console) to diagnose and recover access
