How to generate an SSH key pair in Mac OS?

You can generate a key in Mac OS using the ssh-keygen command. You should run it in Terminal. You will be asked for a file in which the key should be saved to and for a passphrase (password) for the key:

 

This will create a private key written to ~/.ssh/id_dsa and a public key written to ~/.ssh/id_dsa.pub. The passphrase is used to protect your key. You will be asked for it when you load your key. You can do that using the following command:

ssh-add ~/.ssh/id_dsa

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to load an SSH key in Transmit

In order to load an SSH key in Transmit, the key has to be in either PEM or PuTTY (.ppk) format....

How to Connect to Telnet via Mac Terminal

To connect to a server on its Telnet port via your Mac's Terminal application, you need to follow...

Apple/Mac client-side website checks

Prior to posting a website down ticket from your Help Desk it is recommended to test the...

How to log in to my Hostlantern shared account via SSH in Mac OS?

First you should generate an SSH key pair on your Mac OS. Alternatively, you can generate the...

How to log in to my Cloud hosting/VDS via SSH in Mac OS?

The following instructions are valid only for Hostlantern customers. If you are not a Hostlantern...