How to generate an SSH keys on Mac/Linux

1. Open a terminal on your local computer

Open the terminal on your local computer and enter the following:

ssh-keygen -t rsa -C "your_email@example.com"

For example, if your email is “johndoe@gmail.com”, then just put “ssh-keygen -t rsa -C “johndoe@gmail.com” and hit Enter in the terminal.

 

2. Choose a path to save your SSH keys

Then you will see the terminal response as the following:

I suggest just hit Enter without any hesitation 🙂 or you can save to another path you want. For example, if you want to save it on the desktop, just enter /Users/{your_user_name}/Desktop/id_rsa and hit Enter

 

3. Set a password

Next step you will see a response like this:

You can set a complicated password(recommended) or just hit enter to ignore setting up a password(not recommended).

 

4. You are good to go!

Once you see a response like the following, it means you made it and you are good to go!

Leave a Reply

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