Aliases
An alias is a short, memorable nickname mapped to an existing connection. Instead of typing long identifiers like production-payment-gateway-01, you can create an alias such as pay and use it interchangeably across all bssh commands.
Create an alias
Section titled “Create an alias”Run bssh alias add with the new alias and the target connection name, alias, or ID:
bssh alias add wp web-prod✅ Added alias 'wp' → 'web-prod' You can now use: bssh connect wpYou can assign multiple aliases to the same connection:
bssh alias add prod web-prodbssh alias add primary web-prodbssh validates aliases to prevent naming conflicts:
- An alias cannot match an existing connection name.
- An alias cannot duplicate an already registered alias.
List aliases
Section titled “List aliases”Run bssh alias list to view all aliases in the active environment, grouped by host:
bssh alias list📝 All Connection Aliases
web-prod (web.example.com) └─ wp └─ prod
db01 (10.0.1.5) └─ dbTo view only the aliases associated with a specific connection, provide the connection name:
bssh alias list web-prod📝 Aliases for 'web-prod': • wp • prodRemove an alias
Section titled “Remove an alias”Run bssh alias remove with the alias name to delete it:
bssh alias remove wpRemoving an alias only deletes the shortcut mapping. The underlying connection, its settings, and its session history are unaffected.
How aliases resolve
Section titled “How aliases resolve”Aliases resolve everywhere bssh accepts a target connection. You can use an alias in any command that takes a <TARGET> argument:
# Connect to the remote hostbssh connect wp
# View connection detailsbssh show wp
# Edit connection settingsbssh edit wp --port 2222
# Test SSH connectivitybssh ping wp
# Inspect Bayesian ranking scorebssh why wp
# Run a remote commandbssh exec wp -- uptime
# Upload filesbssh upload wp -r ./dist /var/www/html
# Forward a local portbssh forward wp -L 8080:localhost:80Precedence
Section titled “Precedence”When you pass a target identifier, bssh checks exact connection names first. If no connection matches, it searches for a matching alias. If no alias matches, it performs interactive fuzzy matching across your saved connections.
Environment scope
Section titled “Environment scope”Aliases are stored within the active environment’s local SQLite database (history.db). Each environment maintains an independent set of aliases, ensuring nicknames defined in one profile do not conflict with or leak into another.