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

  1. If you have a Cpanel on your server, login to your CPanel
  2. Generate an SSH Key (choose a suitable passphrase while generating the key and make a note of it)
  3. Once the SSH Key is generated, Authorise the key
  4. Download Private and Public keys and copy both the keys to your ~/.ssh directory
  5. Change permissions on both keys, Remove staff, everyone no access, Admin read write
  6. Open terminal and run: ssh-add -K ~/.ssh/KEY_NAME
  7. When prompted enter passphrase used while creating the key

Leave a Reply

Your email address will not be published. Required fields are marked *