Skip to content

uikoo9/ssh-switch

Repository files navigation

ssh-switch

npm version npm downloads

A lightweight CLI tool to manage and switch between multiple SSH configurations easily.

Installation

# Install as dev dependency
npm i -D ssh-switch

# Install globally
npm i -g ssh-switch

Usage

# Show help
sshs
sshs -h

# Add a new SSH config
sshs add

# List all SSH configs
sshs list

# Show current SSH config in use
sshs now

# Switch to a specific config
sshs use <configName>

# Remove a config
sshs remove <configName>

Example

# Add your work GitHub account
$ sshs add
? Enter a name for this SSH config: work
? Host: github.com
? Path to SSH private key file: ~/.ssh/id_rsa_work

# Add your personal GitHub account
$ sshs add
? Enter a name for this SSH config: personal
? Host: github.com
? Path to SSH private key file: ~/.ssh/id_rsa_personal

# Switch to work account
$ sshs use work

# Check current config
$ sshs now
work is now in use

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published