Tired of manually updating your ~/.ssh/config file every time you spin up a
RunPod instance?
runpod_ssh_setup is a simple command-line tool that automates this. It takes the
standard SSH connection command provided by RunPod and automatically creates or updates
a corresponding Host entry in your SSH configuration file.
This allows you to connect to your pods using a simple alias (e.g., ssh runpod)
instead of the full command.
-
Copy the SSH command from the RunPod UI:
Pods → your pod → Connect → Connection Options → SSH → SSH over exposed TCP
-
Run the tool with your desired host alias:
runpod_ssh_setup \ --host runpod \ --ssh_cmd "ssh [email protected] -p 19090 -i ~/.ssh/id_ed25519" -
The tool adds or updates the entry in
~/.ssh/config:Host runpod HostName 157.517.221.29 User root Port 19090 IdentityFile ~/.ssh/id_ed25519 IdentitiesOnly yes
--config: Path to your SSH config file (default:~/.ssh/config).--host: The alias to use in theHost <ALIAS>entry (required).--disable_host_key_checking: If present, adds lines that disable host key checks.--ssh_cmd: Must be in the exact formatssh <USER>@<HOST> -p <PORT> -i <IDENTITY_FILE>, as provided by RunPod.
Adding --disable_host_key_checking inserts the following lines into the Host block:
Host runpod
...
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
By default, host key checking is enabled.
Security Note: Disabling host key checking can be convenient for frequently changing or ephemeral hosts (such as cloud instances), but it increases the risk of man-in-the-middle attacks. We recommend keeping host key checks enabled in production or untrusted environments.
Using pip:
pip install runpod_ssh_setupThis installs runpod_ssh_setup in your current environment (system-wide or
virtualenv).
For a global, isolated install, use pipx
(recommended):
pipx install runpod_ssh_setupIf you have Poetry installed:
poetry lock
poetry installThen run:
poetry run runpod_ssh_setup ...Or build a wheel and install it via pipx:
poetry build
pipx install dist/runpod_ssh_setup-*.whlThen you can run runpod_ssh_setup directly.