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 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/install_scripts/install_mac_arm.sh | zsh- MacOS (Intel - x86_64):
curl -fsSL https://raw.githubusercontent.com/naseriax/sshcli/refs/heads/main/install_scripts/install_mac_x86_64.sh | zsh- Linux (arm):
curl -fsSL https://raw.githubusercontent.com/naseriax/sshcli/refs/heads/main/install_scripts/install_linux_arm.sh | bash- Linux (x86_64):
curl -fsSL https://raw.githubusercontent.com/naseriax/sshcli/refs/heads/main/install_scripts/install_linux_x86_64.sh | bash- Windows (arm):
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/naseriax/sshcli/refs/heads/main/install_scripts/install_win_arm.ps1" -UseBasicParsing | Invoke-Expression- Windows (x86_64):
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/naseriax/sshcli/refs/heads/main/install_scripts/install_win_x86_64.ps1" -UseBasicParsing | Invoke-Expression- What the installation script does to your machine?
- Creates a new folder: ~/sshcli
- Downloads the latest sshcli binary and puts it in ~/sshcli folder
- Adds exec permission to the executable
- Adds a new line to your ~/.zshrc (or the OS equivalent) file to add ~/sshcli to the PATH variable
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. Use sshcli -secure to hide IPs, ports and username(Useful if sharing you screen).
To compile the code, you must have Golang 1.25.5 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:
- Call the binary in your terminal to see the UI
- Add or update a profile in the ~/.ssh/config file:
$> sshcli- For more options, use the help command:
$> sshcli -h
Usage of sshcli:
-action string
Action to perform: add, remove, only for Console profiles
-baudrate string
BaudRate, default is 9600 (default "9600"),only for Console profiles
-cleanup
Delete sqlite records that are not in the ssh config file
-data_bits string
databits, default is 8 (default "8"),only for Console profiles
-device string
device path, default is /dev/tty.usbserial-1140 (default "/dev/tty.usbserial-1140"),only for Console profiles
-host string
Host alias
-parity string
parity, default is none (default "none"),only for Console profiles
-secure
Masks the sensitive data
-sql
Direct access to the sshcli.db file to run sql queries
-stop_bit string
stop bit, default is 1 (default "1"),only for Console profiles
-version
prints the compile time (version)- Ability to store notes per ssh profile, encrypted and stored in the sqlite database
- ssh tunnel setup (same as -L)
- ssh Socks5 tunnel (same as -D)
- ssh over
http_proxysupport - sftp TUI
- 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)
- 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_backup file
~/.ssh/sshcli.db_backup file- A sample ssh profile will be added to the ~/.ssh/config file if the config file is empty.




