SSHP - Let's Pablo memorize your SSH credentials.
Instalation
gem install sshp
Usage
To save an alias without hostname:
sshp-alias u -i ~/keys/my_key.pem -l ubuntu
Then
sshp u hostname.com
To save an alias with hostname:
sshp-alias u -i ~/keys/my_key.pem -l ubuntu hostname.com
Then
sshp u
.sshp
All aliases will be saved at ~/.sshp
.
ssh_config
Remember that you can also use ssh_config for many cases in place of sshp.
# ~/.ssh/config
Host u
HostName hostname.com
User ubuntu
IdentityFile ~/keys/my_key.pem
Then
ssh u
Have a look at "Simplify Your Life With an SSH Config File" it is a well detailed post about ssh_config.
sshp vs ssh_config
The difference between sshp vs ssh_config is that using sshp you can save the aliases without Host
and HostName
, you can save only the credentianls, which is usefull when you have multiple servers/hosts using the same credentianls i.e. sshp u host-a
, sshp u host-b
etc.