We can make logging in over SSH much easier for ourselves. Here we're going to edit a config file on our local machines.
Let's make our lives a little easier by using our local workstation's
- On Mac, tell it to use the keychain so we don't have to remember passwords (Unless used in automation, you should set long, annoying passwords on your SSH keys!)
- Setup a hostname to use as a shortcut to log into our server
Host * UseKeychain yes Host sfhstart HostName <server-ip-address-or-hostname-here> User fideloper IdentityFile ~/.ssh/id_sfh_start IdentitiesOnly yes
Then we can simply login like this:
- A more in-depth guide to the local SSH configuration file
- SSH Tricks, an article making heavy use of the SSH configuration file