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.
- Centralized Configuration — Store all SSH connection details in a structured SQLite database
- Simple Identifiers — Connect to hosts using easy-to-remember names instead of IP addresses
- Jump Host Support — Built-in support for SSH jump hosts (bastion servers)
- Identity Management — Manage multiple SSH identity files with ease
- Region Tagging — Organize hosts by region with custom slugs
- Flexible Output — Retrieve connection details in various formats for scripting
-
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 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 initThis 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
# To connect in verbose mode
xsh connect host-1 -vIn 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 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.


