Bash wrapper around ssh which provides you ability to use contexts (as in kubectl) for SSH.
Better to describe it with example.
- You are developer involved in multiple projects. Each project has own dev/staging/production servers, git services, ssh keys, etc.
- You don't want to manually enter ssh key location each time (or mix your ssh config file).
- You want to share ssh config of one of the projects.
- It's not usable to do that with standard ssh toolchain
And here is ssh-context.
- Project = context
- Context = separate ssh config, keys, etc.
- Use full power of isolated ssh config
ssh-context bash script in any location from your
chmod +x against it and run
ssh-context bootstrap to init file structure
Optional: Set ssh-context as alias for ssh
Bash: Add this alias to
.bash_profile (for OSX):
ZSH: Add this alias to
Fish: Add this alias to
alias ssh="ssh-context wrapper"
Create new context
ssh-context init myproject
ssh-context switch context_name
Connect with current context
ssh-context wrapper <ssh args> # example: ssh-context wrapper -vv user@server
Connect with another context
ssh-context wrapper <context> <ssh args> # example: ssh-context wrapper anotherproject server