Stop typing long SSH commands. Save hosts, run commands, and switch environments instantly.
XSH extends SSH functionality by providing a unified interface for storing, managing, and executing SSH connections. It eliminates the need to remember complex SSH commands, IP addresses, and configuration details by storing everything in a local SQLite database.
Here's why XSH exists:
Yes, you can achieve similar functionality by manually editing ~/.ssh/config, but XSH provides a discoverable, interactive interface that doesn't require memorizing config file syntax. Add hosts through guided prompts, view them in beautiful tables, and connect with simple commands.
Stop polluting your .bashrc or .zshrc with dozens of SSH aliases like alias prod1="ssh -i ~/.ssh/prod user@192.168.1.100". XSH centralizes all your connections in a structured database, keeping your shell config clean.
Adding, modifying, or deleting SSH configurations should be simple:
- Add: Interactive prompts or JSON imports — no manual file editing
- Modify: Clone existing hosts and tweak what you need
- Delete: Interactive selection with referential integrity checks
- View all your hosts in formatted tables with
xsh get host - Export configurations to JSON for backup or sharing
- Auto-import existing SSH commands from your shell history during setup
- Future: Remote backend support for team-wide configuration sharing
- Beautiful terminal UI with color-coded themes
- Interactive menus for host selection and cloning
- Jump host support without manually constructing complex ProxyCommand strings
- Organize hosts by regions for better infrastructure visibility
-
Go to release section of xsh repo, https://github.com/killshotrevival/xsh/releases
-
Download the desired cli
or you can use the following script directly
curl https://raw.githubusercontent.com/killshotrevival/xsh/refs/heads/main/install.sh | bash -git clone https://github.com/killshotrevival/xsh.git
cd xsh
make build
# Placing the binary in required directory
mkdir -p ~/.local/bin
mv bin/xsh ~/.local/bin/
chmod +x ~/.local/bin/xsh
# Make sure the binary directory is present under $PATH
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc
xsh init
xsh importThese command will initialize the xsh environment as well as read the following files to populate the database for configurations:
- Identities in .ssh: Will look for all the identities files present in the .ssh directory and populate them in the database
- .zshrc / .bashrc / .bash_history / .zsh_history: Read the config file for populating the already present host configurations
- .ssh/config (TODO): Read the config file for populating the already present host configurations
# This command will add a new region in the database that can be mapped to hosts
xsh put region us-east-1
# This command will add a new identity file using a unique name and its complete path
xsh put identity twelcon-development /Users/twelcon/.ssh/development
# Create an example file, that can be used for creating a new host
xsh example host -f host.json
# This command will add a new host according to the values declared in host.
xsh put host -f host.json
# This command can be used for viewing a list of all the hosts present
xsh get hostxsh connect host-1
# For interactively selecting the host
xsh connect
# To connect in verbose mode
xsh connect host-1 -vUse the following command for importing the already defined ssh configs under predefined files to xsh
xsh import
# Use -p flag for printing all the files xsh will be importing configurations from
xsh import -pIn situation where maximum properties of a new host matches a host already present in the database, it makes more sense to clone a host instead of creating a new one from scratch
xsh put hSelect resource to edit interactively
xsh editSelect resource to delete interactively and delete them
xsh deletePlease follow this for more information
For a detailed look at upcoming features — including remote backend support, SCP integration, direct SSH config management, and resource tagging — see the Roadmap.
XSH uses SQLite to store configuration with the following structure:
| Table | Description |
|---|---|
hosts |
Host connection details (address, user, identity, jumphost) |
identities |
SSH identity files (name, path) |
regions |
Geographic regions for organization (name) |
The database is stored at ~/.xsh/xsh.db by default. Override with:
export XSH_DB_PATH=/custom/path/config.dbContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.



