Skip to main content

ssh-ls

Stop digging through shell history for that SSH command.

English · 简体中文 · Usage · Releases

CI Release MIT

I didn't want to keep typing ssh .... My SSH config and shell history already held the destinations—I wanted to pick one instead of remembering which alias or command to type.

ssh-ls is a terminal host picker for people who move between remote machines throughout the day. It turns the connections you already have into a searchable list, then hands the selected host to your system's ssh.

Your existing hosts, one list

Run ssh-ls. The picker reads literal host aliases from .ssh/config and supported SSH commands from your bash or zsh history. Press / to search, select a host, and press Enter. The picker closes, native SSH takes over your terminal, and the session ends back at your shell.

Recent puts known, timestamped connections first. Press Space to star the hosts you return to, and find them under Favorites next time. There's no second host inventory you have to fill in before getting started.

Your existing OpenSSH setup still handles keys, agents, jump hosts, and authentication. ssh-ls doesn't replace the SSH client or manage passwords.

See it before using your own hosts

ssh-ls showing a searchable host list and connection details

Install and connect

Requires macOS or Linux, curl, and OpenSSH.

curl -fsSL https://raw.githubusercontent.com/Moviw/ssh-ls/main/install.sh | sh
ssh-ls

Choose a host and press Enter. If Recent is empty, switch to All to see your configured hosts. No import wizard or account to create.

The installer gets the latest stable GitHub Release in an isolated uv environment. It installs uv and downloads Python 3.11 if needed; no sudo, Git, or preinstalled Python is required. Your SSH files, shell profiles, and saved settings stay unchanged. If the command isn't on PATH, the installer prints its full path.

Inspect the installer or use uv / pipx directly
curl -fsSL https://raw.githubusercontent.com/Moviw/ssh-ls/main/install.sh -o install.sh
less install.sh
sh install.sh

With Python 3.11+, you can install the same stable asset directly:

uv tool install https://github.com/Moviw/ssh-ls/releases/latest/download/ssh-ls.tar.gz
# or
pipx install https://github.com/Moviw/ssh-ls/releases/latest/download/ssh-ls.tar.gz

Built-in update and uninstall support official uv installations. For pipx or source installs, use the original installation method instead.

The keys you'll use

Key Action
/ Search by name, host, user, or jump host
j / k, ↑ / ↓ Select a host
Tab, ← / → All · Recent · Favorites
Enter Connect
Space Toggle favorite
o Settings and theme gallery
? Show all shortcuts
q Quit

The picker opens on Recent. Press o to choose Favorites or All as your start page. Host edits, sorting, remote commands, and the remaining controls are in the usage guide.

Make it yours

Settings has separate General and Themes tabs. Choose a theme card to preview it across the app; Save keeps it, and Esc discards the preview. You can also adjust accent color, row spacing, ASCII display, and whether the tab title shows the connected host.

Tokyo Night is the default. The gallery includes Dracula, Catppuccin Mocha, Nord, Gruvbox Dark, Rosé Pine, Minimal, Cyberpunk, Ocean, and Retro.

See the ten-theme gallery

Ten selectable theme previews in ssh-ls Settings

Update or uninstall

ssh-ls update
ssh-ls uninstall

Uninstall asks for confirmation and removes only the app. Favorites, settings, SSH files, uv, and Python are kept. ssh-ls uninstall --yes is available for explicit noninteractive removal.

Interactive launches check public GitHub release metadata in the background. A newer stable version appears in a small banner with ssh-ls update; nothing upgrades automatically. Offline failures are silent, and no SSH config or history is sent.

What stays unchanged

Will it edit .ssh/config? No. Host edits are local overrides under ${XDG_CONFIG_HOME:-~/.config}/ssh-ls/. Native OpenSSH remains the source of truth for connections; displayed config fields are estimates.

Will it replay shell history commands? No. The importer extracts connection fields, discards remote commands, and skips unsupported or shell-dependent syntax. Not every history entry will appear. Parsing limits.

Does it connect or probe hosts on startup? No. SSH starts when you choose a host. Hosts you manually mark as production require confirmation. The v shortcut offers an explicit effective-config preview after a warning: OpenSSH's Match exec can execute local commands even during that preview.

Does it change how SSH sessions work? Native ssh inherits your terminal, and ssh-ls preserves its exit status. Recent records connection attempts, not proof that authentication succeeded.

Contributing

Found a missing history format or a terminal layout that doesn't fit? Open an issue with your OS, Python version, and a fictional example. Never include private keys, real host inventories, or real shell history.

Small, focused pull requests are welcome. See the development guide. Version changes are listed in GitHub Releases.


Dedicated to my research days in Nakayama Lab.

Metadata

Release files for ssh-ls 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ssh-ls 0.1.0
File Size Uploaded
ssh_ls-0.1.0.tar.gz 89.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ssh-ls 0.1.0
File Interpreter ABI Platform
ssh_ls-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 125.1 kB

Release files / ssh_ls-0.1.0.tar.gz

Download URL ssh_ls-0.1.0.tar.gz
Size 89.3 kB
Tags Source
SHA-256 checksum
How to use checksums
46e2cd2731dba4307f2254746682a2a3b18970d9de5b250a2d687dbd553c4e1d
BLAKE2b-256 checksum
How to use checksums
d27fe79d608b4ac6aab23f525352a91674a7423439e8a62b06fcc00f07087cef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / ssh_ls-0.1.0-py3-none-any.whl

Download URL ssh_ls-0.1.0-py3-none-any.whl
Size 35.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b816337d8900dd64f4552889b1f4801986a5b52f0d12416f9879315f72cc922
BLAKE2b-256 checksum
How to use checksums
7e9e221300832ab115bf0a31f21bbb27334f0e7bf5fba356a34d57bd41c70f31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page