A single-file Bash CLI for aliases, keys, ProxyJump, and OS keychain passwords.
One line. No clone, no package manager β the installer drops conn into
/usr/local/bin.
curl -fsSL https://conn.web.ap.it/setup.sh | bash
Requirements: Bash 3.2+, OpenSSH, and a clipboard tool (pbcopy on macOS; xclip,
xsel, or wl-copy on Linux).
git clone https://github.com/andreapollastri/conn.git cd conn ./src/install.sh
Three commands from zero to a live SSH session.
# 1. Add a server (wizard) conn add # 2. Or one-shot conn add production deploy@prod.example.com:22 --folder /var/www # 3. Connect conn to production
On connect, conn checks for an SSH key, optionally copies a saved password to the clipboard,
applies IdentityFile / ProxyJump, and can cd into a remote folder for you.
Full CLI reference. Run conn help anytime.
| Command | Description |
|---|---|
conn add |
Interactive wizard to save a connection |
conn add <alias> <user@host[:port]> |
One-shot add β options: --folder, --identity, --jump,
--password
|
conn list |
Table of all servers and notes (password, folder, identity, jump) |
conn info <alias> |
Show details β passwords are never printed |
conn to <alias> |
Open an SSH session |
conn edit <alias> |
Edit an existing connection |
conn remove <alias> |
Delete a connection (with confirmation) |
conn reset <alias> |
Remove a stale host key via ssh-keygen -R |
conn key <action> |
public, private, or create [--rsa] |
conn update |
Safely update from the latest GitHub commit |
conn completion [bash|zsh] |
Install idempotent shell completion |
conn completion <shell> --print |
Print the raw completion script instead of installing it |
conn help |
Usage reference |
Interactive wizard or a single non-interactive command.
conn add
Prompts for alias, user, host, port, optional password, remote folder, identity file, and ProxyJump host.
conn add production deploy@prod.example.com:22 \ --folder /var/www/myapp \ --identity ~/.ssh/id_ed25519 \ --jump bastion
Pass --password to store a secret (prompts if no value is given). Fields cannot contain
|.
Hand off to OpenSSH with your alias β everything else is wired for you.
conn to production
Before the session starts, conn will:
id_ed25519, id_ecdsa, or id_rsa)ssh with -i / -J when configured, and auto-cd into
the remote folderIf SSH refuses the connection after a rebuild:
conn reset production
Create and inspect keys without leaving the CLI. Default algorithm is ed25519.
conn key public # print public key conn key create # ed25519 β ~/.ssh/id_ed25519 conn key create --rsa # RSA 4096 β ~/.ssh/id_rsa conn key private # requires typing YES
conn key private prints your private key only after an explicit
YES. Prefer sharing the public key.
Update from GitHub without manually replacing the command.
conn update
When conn is installed in /usr/local/bin, the command asks for sudo.
It resolves the latest commit SHA through the GitHub API rather than relying on a potentially stale branch CDN
URL.
Every update is downloaded to a temporary file, checked with bash -n, installed with mode
755, and re-checked before it replaces the current command. The previous copy is retained as
/usr/local/bin/conn.backup; if validation fails, it is restored automatically.
sudo install -m 755 ~/Documents/GitHub/conn/src/conn /usr/local/bin/conn.
Connections live in a plain file you can back up or sync β without secrets inline.
~/.ssh_connections.conf
Format (7 fields):
alias|user|host|port|folder|identity|proxyjump
Example:
production|deploy|prod.example.com|22|/var/www|/Users/me/.ssh/id_ed25519|bastion staging|deploy|staging.example.com|2222||||
The file is created with chmod 600. Override the path with CONN_CONFIG_FILE if
needed.
alias|user|host|port|password|folder files are upgraded
automatically β passwords move into the secret store and leave the config.
Optional passwords are never stored in the connections file. Lookup order:
security (service conn.web.ap.it)secret-toolconn/<alias>~/.ssh_connections.secrets (chmod 600)conn info only reports whether a password is saved β it never prints the value. On connect, the
secret is copied to the clipboard for paste into an interactive SSH password prompt.
pbcopy clipboard support.secret-tool / pass storage and
xclip, xsel, or wl-copy clipboard support.
clip.exe; treat the fallback secret file with
extra care.Tab-complete commands and aliases in bash or zsh.
# bash conn completion bash # zsh conn completion zsh
The command adds the loader to ~/.bashrc or ~/.zshrc only once. Open a new terminal
or run the printed source command. Use conn completion zsh --print when you need the
raw script.
Remove the binary and local data when you no longer need conn.
sudo rm /usr/local/bin/conn rm -f ~/.ssh_connections.conf ~/.ssh_connections.secrets
On macOS, Keychain entries use the service name conn.web.ap.it β delete them from Keychain
Access if you want a full wipe.
Connected with conn? Deploy Laravel on any Ubuntu VPS with cipi.sh β PHP-FPM, MariaDB, Nginx, Let's Encrypt, zero-downtime releases.
Explore cipi.sh β