description | page_type | products | urlFragment | languages | |||
---|---|---|---|---|---|---|---|
This template allows you to create a Virtual Machine with SSH rsa public key |
sample |
|
vm-sshkey |
|
This template allows you to create a Linux Virtual Machine with SSH Keys. This template also deploys Virtual Network with an inbound rule allowing only port 22 connections, Public IP addresses, a Public domain namespace, and a Network Interface.
The SSH rsa public key is typically generated by ssh-keygen, among other tools, on Linux, Mac, or Windows. If you already have an ~/.ssh/id_rsa.pub file, that will work directly, as you would expect. When deployed using the Azure portal, you should paste in the contents of your ssh-rsa public key file as a string. When you deploy the template from the Azure CLI, when the parameter prompts you for the string, do not surround it in quotes, or they will be treated as part of the public key.
For more information about SSH keys, see:
- Quick steps: Create and use an SSH public-private key pair for Linux VMs in Azure
- How to use SSH keys with Windows on Azure
- Detailed steps: Create and manage SSH keys for authentication to a Linux VM in Azure
If you are new to Azure virtual machines, see:
- Azure Virtual Machines.
- Azure Linux Virtual Machines documentation
- Azure Windows Virtual Machines documentation
- Template reference
- Quickstart templates
If you are new to the template deployment, see:
Azure Resource Manager documentation
Tags: Microsoft.Network/networkSecurityGroups, Microsoft.Network/publicIPAddresses, Microsoft.Network/virtualNetworks, Microsoft.Network/networkInterfaces, Microsoft.Compute/virtualMachines