An ssh helper when you have too many ssh hosts
- Get inside the
sshhdirectory
$ cd sshh- Get the absolute path to this
sshhdirectory and copy that path
$ pwd
> /path/to/sshh- Open your
.bashrc,.zshrcor whatever configuration file your terminal uses and add the following line to it
alias sshh='/path/to/sshh/sshh.py'- Run the source command to apply the changes (example below)
$ source ~/.zshrc- You can now execute
sshhfrom anywhere
$ sshh- You can use the tool from anywhere using the
sshhcommand. - To get help on the arguments you can run
sshh -h. - The first time you run the command you will have to navigate the folder where you are storing all your pem files.
- To add a new instance ssh you can run
sshh -a <friendly_name>. This will prompt you to enter the instance IP. Then it will ask you to choose the pem file from the directory where you store all pem files. - To ssh into an instance using a friendly name you can run
sshh -n <friendly_name>. - You can also just run
sshhcommand to choose which instance to ssh into. - To remove a friendly name you can use
sshh -r <friendly_name> - To describe a friendly name you can use
sshh -d <friendly_name> - To search a friendly name you can use
sshh -s <search text>. The search text can be.for listing all or your search text will be used to match the starting letters of the friendly name