Importing an SSH key to your keychain on Mac allows you to login without entering your passphrase each time.
This helps if you are a developer and require to commit your changes to the server quite frequently.
Here are the steps
- If you have a Cpanel on your server, login to your CPanel
- Generate an SSH Key (choose a suitable passphrase while generating the key and make a note of it)
- Once the SSH Key is generated, Authorise the key
- Download Private and Public keys and copy both the keys to your ~/.ssh directory
- Change permissions on both keys, Remove staff, everyone no access, Admin read write
- Open terminal and run: ssh-add -K ~/.ssh/KEY_NAME
- When prompted enter passphrase used while creating the key