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

# Connecting via SSH

> Generate a key, add it, connect, troubleshoot.

## 1. Generate a key (if you don't have one)

```bash macOS / Linux theme={null}
ssh-keygen -t ed25519 -C "you@gpuoutlet.com"
```

```powershell Windows (PowerShell) theme={null}
ssh-keygen -t ed25519 -C "you@gpuoutlet.com"
```

Accept the default location. Either skip the passphrase (faster) or set
one (more secure — recommended for shared machines).

The command creates two files:

* `~/.ssh/id_ed25519` — your **private** key. **Never share. Never paste anywhere.**
* `~/.ssh/id_ed25519.pub` — your **public** key. Safe to share.

## 2. Add the public key

```bash macOS theme={null}
cat ~/.ssh/id_ed25519.pub | pbcopy
```

```bash Linux (with xclip) theme={null}
cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard
```

```bash Windows PowerShell theme={null}
Get-Content ~/.ssh/id_ed25519.pub | Set-Clipboard
```

Now in the dashboard: **Settings → SSH keys → + Add key**. Paste, give it a
name (`macbook-2026`), save.

## 3. Connect to an instance

After launching a pod, the modal shows something like:

```
ssh root@123.45.67.89 -p 22001
```

That line only carries the **address** — it doesn't include *your* key, because
we don't know its filename on your machine. Connect with **your private key**
(the one whose public half you added in step 2) using `-i`:

```bash theme={null}
ssh -i ~/.ssh/id_ed25519 root@123.45.67.89 -p 22001
# The authenticity of host '[123.45.67.89]:22001' can't be established.
# ED25519 key fingerprint is SHA256:abc…
# Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
# Welcome to Ubuntu 24.04 …
root@gpu-pod-01:~#
```

Confirm `yes` at the fingerprint prompt the first time.

<Note>
  Replace `~/.ssh/id_ed25519` with **your own** private-key path. If you created
  a dedicated key (e.g. `~/.ssh/gpuoutlet_ed25519`), point `-i` at it:

  ```bash theme={null}
  ssh -i ~/.ssh/gpuoutlet_ed25519 root@123.45.67.89 -p 22001
  ```

  You can omit `-i` **only** if the key you added is your default
  `~/.ssh/id_ed25519`. Otherwise SSH offers the wrong key and you get
  `Permission denied (publickey)` — when in doubt, pass `-i` explicitly.
</Note>

## 4. Save the connection in your SSH config

If you'll reconnect often:

```ssh-config ~/.ssh/config theme={null}
Host gpu-rtx4090
    HostName 123.45.67.89
    Port 22001
    User root
    IdentityFile ~/.ssh/id_ed25519
    StrictHostKeyChecking no
    UserKnownHostsFile=/dev/null
```

Then just `ssh gpu-rtx4090`. `StrictHostKeyChecking no` + the `/dev/null`
known\_hosts trick is reasonable here because every rental gets a fresh IP
and you'd otherwise build up a giant known\_hosts that you'd have to clear.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Permission denied (publickey)">
    Your local key isn't matching any of the keys you've added. Verify:

    ```bash theme={null}
    ssh-add -L | grep ed25519
    ```

    Should match the key you pasted in the dashboard. If it doesn't, you may
    have multiple keys — pass `-i` explicitly:

    ```bash theme={null}
    ssh -i ~/.ssh/id_ed25519 root@host -p 22001
    ```
  </Accordion>

  <Accordion title="Connection timed out">
    Three causes:

    1. **Pod still provisioning** — wait until status says **running** in the
       dashboard
    2. **Wrong port** — every pod gets a random high port. Check the modal.
    3. **Your firewall** — corporate VPNs sometimes block outbound on
       non-standard ports. Test from a different network.
  </Accordion>

  <Accordion title="Connection refused">
    Pod's SSH daemon isn't up yet — happens during the last 5 seconds of
    provisioning. Wait, retry.
  </Accordion>

  <Accordion title="My key worked yesterday, doesn't today">
    You probably deleted the key from the dashboard and launched a new pod.
    New pods only see the keys present at the moment of launch. Re-add the
    key, launch a fresh pod.
  </Accordion>

  <Accordion title="Multiple keys, want to use a specific one">
    Either use `-i ~/.ssh/specific_key` per-command or pin it in
    `~/.ssh/config` per-host (see above).
  </Accordion>
</AccordionGroup>

## Copying files

```bash Local → pod (entire folder) theme={null}
rsync -avz --progress ./project root@host:/root/ -e "ssh -p 22001"
```

```bash Pod → local (single file) theme={null}
scp -P 22001 root@host:/root/output.bin ./
```

```bash Pod → S3 (from inside the pod) theme={null}
aws s3 cp /root/model.safetensors s3://your-bucket/
```

## Port forwarding (Jupyter, vLLM web UI, etc.)

If you're running Jupyter on port 8888 inside the pod and want it on
`localhost:8888` locally:

```bash theme={null}
ssh -L 8888:localhost:8888 root@host -p 22001
```

Then open [http://localhost:8888](http://localhost:8888) in your browser.
