SSH keys should be your standard, go-to for interacting with any remote server. They remove the need to memorize a server password. They allow you to login programmatically, and they give your local operating system the chance to handle the caching of your password in your keychain. It’s also very simple.
A few rules you should always follow.
- Always make a passphrase.
- Don’t use the same SSH key on multiple important servers.
- Don’t share the private key.