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:Info flags
bool
Include Pod ID and name in output. Shorthand:
-v.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 reports the specific reason instead of a generic message.To connect to your Pod, use the SSH command provided in the output: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:
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.
For the full list of runtime status values, see Pod runtime status.
List SSH keys
List all SSH keys associated with your account:Add an SSH key
Add a new SSH key to your account:# are skipped. If any other line isn’t a valid public key, the command fails before saving anything. Keys already on your account are matched by fingerprint and aren’t added again.
Add-key flags
string
The public key string to add.
string
Path to a file containing the public key.
bool
Delete saved entries that aren’t valid public keys without asking. See Fix invalid saved entries.
Remove an SSH key
Remove an SSH key from your account by name or fingerprint:--name, --fingerprint, or --invalid. If multiple keys share the same name, use --fingerprint instead.
Remove-key flags
string
Name of the key to remove.
string
Fingerprint of the key to remove. Use this when multiple keys have the same name.
bool
Remove every saved entry that isn’t a valid public key, and keep all valid keys. Can’t be combined with
--name or --fingerprint.bool
Delete saved entries that aren’t valid public keys without asking, then remove the key you specified.
Fix invalid saved entries
Older accounts can have saved SSH key entries that aren’t valid public keys, such as a stray line of text. While any such entry exists, Runpod rejects every change to your key list, so you can’t add or remove keys. When you runssh add-key or ssh remove-key in an interactive terminal, runpodctl lists the invalid entries and asks whether to delete them before continuing. Nothing is deleted unless you confirm.
When runpodctl runs in a script or from an AI agent, it doesn’t prompt. Instead, the command fails with a conflict error that names the invalid entry. To fix it, do one of the following:
- Re-run the command with
--remove-invalidto delete the invalid entries as part of the same change. - Run
runpodctl ssh remove-key --invalidto delete only the invalid entries.