Skip to main content

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

Project description

ssh-to-server

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.5.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.5-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ssh_to_server-1.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 214be5a3e980f3bda91ef76382f052e5f346fa47e9d33b5224a53bb8f5bb5699
MD5 47fc7fd2c4a302c1f23eb4ff6d128b60
BLAKE2b-256 c9ba610c4f0c42cca2471bac53a7b41829b60758ed6a2a8e49c3dda44dd6ca15

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ssh_to_server-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.4 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 abcab020eff99d8e7dde0f2c0b7234f40159711c69ed111b58038c1c0ca54cf3
MD5 e78406400923abd3294b4060b5c25578
BLAKE2b-256 22e58da8e7b95e80d075c1ed3902d878faeab9f46d9252f90ba0e39f81250d22

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