Skip to content

dominikroblek/runpod_ssh_setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RunPod SSH Setup

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.

How it Works: Example

  1. Copy the SSH command from the RunPod UI:

    Podsyour podConnectConnection OptionsSSHSSH over exposed TCP

  2. Run the tool with your desired host alias:

    runpod_ssh_setup \
      --host runpod \
      --ssh_cmd "ssh [email protected] -p 19090 -i ~/.ssh/id_ed25519"
  3. 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

Options

  • --config: Path to your SSH config file (default: ~/.ssh/config).
  • --host: The alias to use in the Host <ALIAS> entry (required).
  • --disable_host_key_checking: If present, adds lines that disable host key checks.
  • --ssh_cmd: Must be in the exact format ssh <USER>@<HOST> -p <PORT> -i <IDENTITY_FILE>, as provided by RunPod.

Disabling Host Key Checking

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.

Installation

Option 1: Install From PyPI

Using pip:

pip install runpod_ssh_setup

This installs runpod_ssh_setup in your current environment (system-wide or virtualenv).

For a global, isolated install, use pipx (recommended):

pipx install runpod_ssh_setup

Option 2: Build From Source

If you have Poetry installed:

poetry lock
poetry install

Then run:

poetry run runpod_ssh_setup ...

Or build a wheel and install it via pipx:

poetry build
pipx install dist/runpod_ssh_setup-*.whl

Then you can run runpod_ssh_setup directly.

License

MIT License

About

A simple CLI tool to manage SSH config entries for RunPod.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages