Add Host configurations to ssh config
# ~/.ssh/config # server on Amazon LightSail Host lightsail HostName tornado.mycooldomain.com User kunami IdentityFile ~/.ssh/id_rsa Port 4234
Hostis followed by whatever alias you want to give the host definition
HostNamecould be an FQDN or a numeric IP address
IdentityFileis the SSH key used for connecting to the server. I always use a key..
Portare self explanatory.
Portis good to specify here if you use custom ports (which you should).
You can also do other cool stuff like tunneling and port forwarding
Now you can do this:
instead of this:
ssh -i ~/.ssh/id_rsa -p 4234 firstname.lastname@example.org