For more information, see Create an Azure Bastion host. Make sure that you have set up an Azure Bastion host for the virtual network in which the VM resides. The SSH private key must be in a format that begins with '-BEGIN RSA PRIVATE KEY-' and ends with '-END RSA PRIVATE KEY-'. A file that contains the private key information.You can connect to your VM with SSH keys by using either: When connecting to a Linux virtual machine using SSH, you can use both username/password and SSH keys for authentication. For more information, see the What is Azure Bastion?. Using Azure Bastion protects your virtual machines from exposing RDP/SSH ports to the outside world, while still providing secure access using RDP/SSH. For information, see Create an RDP connection to a Linux VM.Īzure Bastion provides secure connectivity to all of the VMs in the virtual network in which it is provisioned. You can also connect to a Linux VM using RDP. When you use Azure Bastion, your VMs don't require a client, agent, or additional software. This article shows you how to securely and seamlessly create an SSH connection to your Linux VMs located in an Azure virtual network directly through the Azure portal. Create an SSH connection to a Linux VM using Azure Bastion