Skip to main content

An interactive menu for selecting an SSH profile.

Project description

sshme

Interactive SSH profile selector for the terminal. Pick a host from your ~/.ssh/config with arrow keys or type to filter, then connect — or open an SFTP session, install your public key, or drop into a tmux window.

Installation

uv tool install sshme
# or
pip install sshme

Usage

sshme [options] [-- <ssh-flags>]

Run sshme with no arguments to open the selection menu. Navigate with arrow keys or type to filter. Recent connections appear at the top.

Options

Flag Description
-c, --config <path> SSH config file (default: ~/.ssh/config)
-l [USER] Login user — omit USER to be prompted
-i [KEYFILE] Identity file — omit KEYFILE to choose from ~/.ssh/
-t, --tmux Attach to or create a remote tmux session named ssh after connecting
--sftp Open an SFTP session instead of SSH
--copy-id Run ssh-copy-id to install your public key
-- Pass remaining arguments directly to ssh, sftp, or ssh-copy-id

Examples

# Select a host and connect
sshme

# Connect as a specific user
sshme -l root

# Open SFTP with a specific identity file
sshme --sftp -i ~/.ssh/work_key

# Choose an identity file interactively
sshme -i

# Forward a local port
sshme -- -L 8080:localhost:8080

# Install your public key on a host
sshme --copy-id

tmux Integration

When a tmux session is active, sshme opens the connection in a new window named SSH:<host>. If a window with that name already exists, sshme switches to it instead of opening a duplicate.

Config Files

sshme reads hosts from ~/.ssh/config, including any Include directives. Supplement or annotate those hosts with a TOML config file.

Discovery order:

  1. ~/.config/sshme/config.toml — user-wide defaults
  2. .sshme.toml or sshme.toml — project-local, searched upward from the current directory

Project-local entries shadow user-wide entries when names conflict.

Schema

# Add a host not in ~/.ssh/config
[[hosts]]
name = "devbox"
hostname = "192.168.1.42"
port = 2222
user = "dev"
description = "Local dev VM"

# Annotate an existing SSH config host with a description
[[hosts]]
name = "prod"
description = "Production cluster — handle with care"

All fields except name are optional. For hosts already in ~/.ssh/config, hostname, port, and user appear as menu hints; OpenSSH resolves the connection from its config. For hosts defined only in TOML, those fields drive the connection.

History

sshme records each selected profile in ~/.local/share/sshme/history.json and sorts recent hosts to the top of the menu. Set XDG_DATA_HOME to store the file elsewhere.

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

sshme-2.0.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

sshme-2.0.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file sshme-2.0.0.tar.gz.

File metadata

  • Download URL: sshme-2.0.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.11","id":"zokor","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sshme-2.0.0.tar.gz
Algorithm Hash digest
SHA256 eb98c8aa5732653462473d777f59701559cbb19ac9b4eb049c7abd2bcab93005
MD5 0db689b431cb89548450518044f3664f
BLAKE2b-256 844bbba3de7560bd95e3d626f69773e6bbe105ffcf3d527bdd1ddcb5c125b9da

See more details on using hashes here.

File details

Details for the file sshme-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: sshme-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.11","id":"zokor","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sshme-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eca8c25815b847ff454d057913cdf464830ddfe8f2693541b0e743c5e5ee8e00
MD5 348d82baa520af60735194107027f840
BLAKE2b-256 f45353ffbef028e32b0e8dc357e282e0607732a03f43c0188f2677dbc64325df

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