How To Generate a new SSH Key

September 21, 2018 ยท 1 minute read

Steps to generate a new private SSH key

This tutorial walks through the process of creating a private SSH key to use in conjunction with a remote server.

In my post “Installing Prometheus on Azure” one of the steps is to create a new key. For those unfamilar with this process, please follow along below.

From your terminal (command line) NOTE: I use iterm2 on my MacBook Pro… run the following command:


If you have previously generated a key using the default location and file name, you will be prompted to Overwrite the file as well as provide a passphrase.

You can accept (y) to Overwrite and leave the passphrase blank. Press enter a few times and you’ll see confirmation that your ssh key has been generated.

You can view your key by printing (cat) the file to your screen with:

cat /Users/jasonhand/.ssh/ <– replace /Users/jasonhand/ with your own directory location.

If you were following the instruction on “Installing Prometheus on Azure”, return to that post and continue.

More on SSH keys to come. This is just for those who are new to the process but want to get a VM up and running on Azure. Tweet me if you need more help with this step.