There’s a simple way to create aliases in a SSH config file. This way you can connect way easier to different hosts, combined with this blog post to use keys to log in.
Where you used to use this connect string:
ssh email@example.com firstname.lastname@example.org's password: <<enter boresome password>>
You can now just enter
Where “pi” is the alias that you’ll be using!
The only thing you’ll need to do is create the following file:
[[ ~/.ssh/config ]]
Host pi HostName 192.168.0.5 User pi << (!) Only add below line if you're using keys to log in >> IdentityFile ~/.ssh/keys/raspberry_key
Aint that awesome!?
Ps. If you’re still being asked to enter your password, check your keys and please look at this blog post I wrote.