sshcli is a command-line interface tool that uses the ~/.ssh/config file as a profile database. It allows you to add or remove profiles and connect to them in an interactive environment.
- The nc on mac/ncat on linux/windows, ssh and sftp commands must be available in your system's PATH environment variable.
- The sshpass tool can be installed optionally if password authentication is needed.
- The sshcli.db file acts as an encrypted password database since the ssh config file doesn't support storing passwords.
- ssh passwords can be added to new or existing profiles using the --host VM10 --askpass parameters, or by choosing "Set Password" in the profile submenu.
- In theory, all operating systems and cpu architecture are supported, but the testing is done only on MacOS.
- MacOS (Apple Silicon - arm):
curl -fsSL https://raw.githubusercontent.com/naseriax/sshcli/refs/heads/main/installation_scripts/install_sshcli_mac_arm.sh | zsh
- MacOS (Intel - x86_64):
curl -fsSL https://raw.githubusercontent.com/naseriax/sshcli/refs/heads/main/installation_scripts/install_sshcli_mac_x86_64.sh | zsh
- Linux (arm):
curl -fsSL https://raw.githubusercontent.com/naseriax/sshcli/refs/heads/main/installation_scripts/install_sshcli_linux_arm.sh | bash
- Linux (x86_64):
curl -fsSL https://raw.githubusercontent.com/naseriax/sshcli/refs/heads/main/installation_scripts/install_sshcli_linux_x86_64.sh | bash
- Windows (arm):
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/naseriax/sshcli/refs/heads/main/installation_scripts/install_sshcli_windows_arm.ps1" -UseBasicParsing | Invoke-Expression
- Windows (x86_64):
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/naseriax/sshcli/refs/heads/main/installation_scripts/install_sshcli_windows_x86_64.ps1" -UseBasicParsing | Invoke-Expression
-
This script does below changes on your machine:
- Creates a new folder: ~/sshcli
- Downloads the sshcli binary and put it in ~/sshcli folder
- Adds exec permission to the executable
- Adds a new line to your ~/.zshrc file to add ~/sshcli to the PATH variable
-
Or you can download the latest binary for your OS/CPU architecture from the releases section manually.
- Starting with release 20250808.0631, the new variant uses SQLite (no CGO required) to store passwords, encryption keys, notes and folder information.
- If you're coming from a pre-SQLite release, the app will automatically migrate your passwords, encryption key, and folder structure to the sshcli.db file during the very first execution.
Use / to bring up the search field and find a host from the list more easily. Use sshcli -sql to access the sql client engine of the sshcli.db to check the content or do some fun queries.
To compile the code, you must have Golang installed on your system.
- Check go.mod for the exact golang release requirement.
- Install golang for your operating system and cpu architecture.
https://go.dev/dl/ - Clone the repository.
git clone https://github.com/naseriax/sshcli.git cd sshcli - Run
go mod tidyto download the required modules. - Compile:
- Running on Windows x86_64, compiling for Windows x86_64:
$env:GOOS="windows"; $env:GOARCH="amd64"; $env:CGO_ENABLED="0"; go build .
- Running on Apple Silicon Mac, compiling for Apple Silicon Mac:
env GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-X main.CompileTime=date -u +.%Y%m%d.%H%M%S"
- Running on Apple Silicon Mac, compiling for Linux x86_64:
env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.CompileTime=date -u +.%Y%m%d.%H%M%S"
- Run the tool by calling the binary.
- Running on Windows x86_64, compiling for Windows x86_64:
- Just run
sshclion your terminal to see the UI - Add or update a profile in the ~/.ssh/config file:
# sshcli --action add --host t001 --hostname 10.10.10.10 --key '~/.ssh/id_rsa' --username root --port 22 --askpass
Enter Password:
- Remove an existing SSH profile from the ~/.ssh/config file:
# sshcli --action remove --host t001
- For more options, use the help command:
Usage of sshcli:
-action string
Action to perform: add, remove
-askpass
Password prompt
-baudrate string
BaudRate, default is 9600 (default "9600")
-data_bits string
databits, default is 8 (default "8")
-device string
device path, default is /dev/tty.usbserial-1140 (default "/dev/tty.usbserial-1140")
-host string
Host alias
-hostname string
HostName or IP address
-httpproxy string
http proxy to be used for the ssh/sftp over http connectivity (optional),eg. 10.10.10.10:8000
-key string
IdentityFile path
-parity string
parity, default is none (default "none")
-port string
Port Number
-sql
Direct access to the sshcli.db file to run sql queries
-stop_bit string
stop bit, default is 1 (default "1")
-type string
profile type, can be ssh or console, default is ssh (default "ssh")
-username string
Username
-version
prints the compile time (version)
- Ability to store notes per ssh profile, encrypted and stored in the sqlite database
sshtunnel setup (-L)sshoverhttp_proxysupportsftpTUI- Zero-Touch encrypted SSH password database (using
sshpass) - Uses the default
~/.ssh/configfile as the profile database - Supports console connection profiles (MacOS only, uses cu tool)
- Flat or foldered structure.
pingandtcpingintegration (pingandtcpingmust be available in the cli)- Access the sql db directly via
sshcli -sql
- Install the Alacritty terminal (works on other terminal emulators as well, but Alacritty provides the best experience).
https://alacritty.org/ - Add the desired keyboard binding in the Alacritty config file by adding the following lines to
~/.config/alacritty/alacritty.toml:- This runs the tool on Option+S in Alacritty.
- The tool's executable name has been changed to
sshcliin this example.
[keyboard]
[[keyboard.bindings]]
key = "S"
mods = "Alt"
chars = "sshcli\n"
~/.ssh folder
~/.ssh/config file
~/.ssh/sshcli.db file
~/.ssh/config_lastbackup file
~/.ssh/sshcli.db_lastbackup file
- A sample ssh profile will be added to the ~/.ssh/config file if the config file is empty.




