Skip to main content

A simple CLI tool to SSH into servers from your ~/.ssh/config

Project description

ssh-to-server

PyPI Downloads CI PyPI Python License

A CLI tool that reads your ~/.ssh/config and lets you SSH into servers interactively — no need to remember hostnames or IPs. Cover Image

Features

  • Lists all hosts from ~/.ssh/config
  • Select by number or navigate with arrow keys
  • Respects all SSH config settings (User, IdentityFile, Port, etc.)
  • Works on macOS, Linux, and Windows

Requirements

  • Python 3.11+
  • OpenSSH (ssh binary available in PATH)

Installation

The recommended way is with uv, a fast Python package manager that handles the Python version automatically:

uv tool install ssh-to-server

Or with pip, ensuring you use Python 3.11+:

pip install ssh-to-server                    # if your default Python is 3.11+
python3.11 -m pip install ssh-to-server      # to target a specific version

Usage

ssh-to-server

You'll see a numbered list of your hosts. Type a number and press Enter to connect directly, or press Enter without a number to use the arrow-key selector.

Configuration

The tool reads hosts from ~/.ssh/config by default. You can override this by creating ~/.config/ssh-to-server/config.toml:

[ssh]
config_path = "~/dotfiles/ssh/config"

SSH config format

If you don't have a ~/.ssh/config yet, here's an example:

Host my-server
  HostName 192.168.1.10
  User ubuntu
  IdentityFile ~/.ssh/id_ed25519

Host work-vpn
  HostName vpn.example.com
  User alice
  Port 2222

Contributing

Contributions are welcome. Please open an issue first to discuss what you'd like to change.

git clone https://github.com/LucasDaSilva96/Py-SSH
cd Py-SSH
uv sync
uv run ssh-to-server

# Run tests
uv run pytest

# Lint
uv run ruff check .

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssh_to_server-1.0.6.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ssh_to_server-1.0.6-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file ssh_to_server-1.0.6.tar.gz.

File metadata

  • Download URL: ssh_to_server-1.0.6.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ssh_to_server-1.0.6.tar.gz
Algorithm Hash digest
SHA256 9d20023184f2276e69b82f6559296b806fb7d2324121d7ed44a49eaec80914f0
MD5 bf98568dd6a834d93c7279c65b142eca
BLAKE2b-256 b94cf9a4ee7c6de5e07db643c5f49fc06a2222d5d4f25a8f508413fca24c8620

See more details on using hashes here.

File details

Details for the file ssh_to_server-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: ssh_to_server-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ssh_to_server-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ce61709810c1a871f655e564930e51af50f47fa305e579d64e36a7e83ce03cdf
MD5 f5b27c491fa905c706aad23918f9ce26
BLAKE2b-256 43dbb53565e9aa87c8a0c33964c36f5b067909818e3a47c58f19779297ee7cd8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page