A package to easily connect and manage your SSH connections.
Note: the arguments are optional
First install the Node.js higher or equal to 16. Use the JavaScript Tool Manager Volta or the Node Version Manager.
Before you can use this package as an executable you need to create a JSON file. Run the following command to create this file:
ssh-connect configure <path_for_file>
ssh-connect configure <path_for_file>
ssh-connect list <path_for_file>
ssh-connect connect <path_to_file> <connection_name>
ssh-connect add <path_to_file> <connection_name>
ssh-connect remove <path_to_file> <connection_name>
ssh-connect edit <path_to_file> <connection_name>
ssh-connect get <path_to_file> <connection_name>
ssh-connect aliases <path_for_file>
You can use aliases to predefine the type, connection:
alias ssh-con="ssh-connect connect $HOME/connections.json"
alias ssh-add="ssh-connect add $HOME/connections.json"
alias ssh-rm="ssh-connect remove $HOME/connections.json"
alias ssh-ls="ssh-connect list $HOME/connections.json"
alias ssh-edit="ssh-connect edit $HOME/connections.json"
alias ssh-get="ssh-connect get $HOME/connections.json"
alias ssh-alias="ssh-connect aliases $HOME/connections.json"
You can take it even further by making aliases for specific connection names:
alias google="ssh-connect connect $HOME/connections.json google"
alias ssh-google="ssh-connect connect $HOME/connections.json google"
alias cloudflare="ssh-connect connect $HOME/connections.json cloudflare"
alias ssh-cloudflare="ssh-connect connect $HOME/connections.json cloudflare"