Brain Dump: Generate SSH2 Public Key for Linux VMs in Microsoft Azure


Generate a Private and Public Key using ssh-keygen in the Terminal.

This will write 2 files. The Public Key (azure.pub) and the Private Key (azure).

After generating the Private and Public Key, get the SSH2 Public Key by typing the command:

The command stated above will output the SSH2 Public Key in the terminal.

You can now use this when provisioning Linux Virtual Machines in the Microsoft Azure Cloud Resource Manager.

After provisioning the Virtual Machine, you can now login to it via SSH using the Private Key.

Show your support

Clapping shows how much you appreciated Benj Sicam’s story.