> ## Documentation Index
> Fetch the complete documentation index at: https://runpod-b18f5ded-promptless-runpodctl-pod-runtime-status.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ssh

Manage SSH keys and get SSH connection information for Pods.

<RequestExample>
  ```bash Command theme={null}
  runpodctl ssh <subcommand> [flags]
  ```
</RequestExample>

## Subcommands

### Get SSH connection info

Get SSH connection details for a Pod. This returns the SSH command and key information, but does not initiate an interactive session:

```bash theme={null}
runpodctl ssh info <pod-id>
```

#### Info flags

<ResponseField name="--verbose" type="bool">
  Include Pod ID and name in output. Shorthand: `-v`.
</ResponseField>

<Note>
  The `ssh info` command returns connection details that you can use to connect via SSH manually. It does not start an interactive SSH session. When a Pod is not reachable, `runpodctl ssh info` now reports the specific reason instead of a generic "pod not ready" message.

  To connect to your Pod, use the SSH command provided in the output:

  ```bash theme={null}
  ssh user@host -p <port> -i <key-path>
  ```
</Note>

`runpodctl ssh info` explains which of the following cases applies. It also reports the Pod's `runtimeStatus`, so you can match a not-ready result to the runtime status vocabulary:

| Reason                | Meaning                                                                                                                                                                                          | What to do                                                                                                                                                                                         |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Pod is initializing   | No container is reported yet (image pull, container creation, or boot).                                                                                                                          | Wait and try again.                                                                                                                                                                                |
| Pod is stopped        | The Pod's container is gone but its disk is kept.                                                                                                                                                | Start it with `runpodctl pod start <pod-id>`.                                                                                                                                                      |
| Pod is terminated     | The Pod has been destroyed.                                                                                                                                                                      | None; deploy a new Pod.                                                                                                                                                                            |
| No SSH port published | The Pod is running but does not publish `22/tcp`.                                                                                                                                                | Add it with the `runpodctl pod update` command the CLI provides (see the Warning below).                                                                                                           |
| No public IP          | Port 22 is mapped, but the machine has no publicly routable IP. This affects direct SSH over a public IP specifically; basic SSH (proxied through Runpod, no public IP required) may still work. | Use [Basic SSH](/pods/configuration/use-ssh#basic-ssh-with-key-authentication), which does not need a public IP. If you need direct SSH over a public IP, redeploy on a machine that provides one. |
| Mapping not ready yet | Port 22 is declared, but the host has not published the mapping yet.                                                                                                                             | Wait and try again.                                                                                                                                                                                |

For the "No SSH port published" case, `runpodctl ssh info` gives you a ready-to-run command of the form `runpodctl pod update <pod-id> --ports <existing-ports>,22/tcp` that preserves your existing ports.

<Warning>
  `runpodctl pod update --ports` replaces the Pod's entire port list (unlike `--env`, which merges), so always include your current ports when you add `22/tcp`. Changing the port list also bumps the Pod's version, which can restart the container. Processes and container-local state outside the volume disk may not survive. If the Pod is running an active job, checkpoint your work to the volume disk before changing ports, since the container may restart.
</Warning>

For the full list of runtime status values, see [Pod runtime status](/runpodctl/reference/runpodctl-pod#pod-runtime-status).

### List SSH keys

List all SSH keys associated with your account:

```bash theme={null}
runpodctl ssh list-keys
```

### Add an SSH key

Add a new SSH key to your account:

```bash theme={null}
# Add a key from a file
runpodctl ssh add-key --key-file ~/.ssh/id_ed25519.pub

# Add a key directly
runpodctl ssh add-key --key "ssh-ed25519 AAAA..."
```

#### Add-key flags

<ResponseField name="--key" type="string">
  The public key string to add.
</ResponseField>

<ResponseField name="--key-file" type="string">
  Path to a file containing the public key.
</ResponseField>

### Remove an SSH key

Remove an SSH key from your account by name or fingerprint:

```bash theme={null}
# Remove a key by name
runpodctl ssh remove-key --name my-laptop

# Remove a key by fingerprint
runpodctl ssh remove-key --fingerprint SHA256:abcd1234...
```

You must provide either `--name` or `--fingerprint`. If multiple keys share the same name, use `--fingerprint` instead.

#### Remove-key flags

<ResponseField name="--name" type="string">
  Name of the key to remove.
</ResponseField>

<ResponseField name="--fingerprint" type="string">
  Fingerprint of the key to remove. Use this when multiple keys have the same name.
</ResponseField>

## Related commands

* [`runpodctl pod get`](/runpodctl/reference/runpodctl-pod)
* [`runpodctl doctor`](/runpodctl/reference/runpodctl-doctor)
