Setting up SSH Key Auth on a Mac
Setting up public key auth allows you to ssh and scp to remote hosts without using your password. It uses encryption keys instead. Typically when you set up a private key it is best practice to set a password on the private key, which would result in a need to enter the private key password every time you want to login to a remote host. Apple has a feature of the MacOS X Keychain that allows you to add this password to your keychain, basically making the unlocking of the private key transparent. You can also change the protection level on this password in Keychain Access to require the keychain password every time it's used.
The gist of what we'll be doing is creating a private key, and then sending the associated public key to the remote host to establish trust between the local system and the remote system.
Copy the following code blocks into a terminal window, one after the other. Several will prompt you for passwords, either for your public ke