Creating an SSH key pair is straightforward and should only take a moment by following these simple steps.
To get started, log in to Azure Portal and click the Cloud Shell button on the top bar.
If this is the first time that you’ve used the Cloud Shell then you’ll be asked whether you want to use Bash or Powershell, for this we will be using Bash. It is simple to change this to Powershell and back in the future via the drop-down at the top of the Cloud Shell window.
Next, Azure will need to create some persistent storage which will be used to store scripts, config and SSH key pairs.
At the Bash prompt, type ssh-keygen to start the key generation process. Press Enter to accept the default option for the file but do enter a passphrase when prompted.
After a few seconds, the SSH key pair will be created.
That’s all there is to it! 🙂