az ssh

SSH into Azure VMs.

Commands

az ssh config

Create an SSH config for Azure VMs which can then be imported to 3rd party SSH clients.

az ssh vm

SSH into Azure VMs.

az ssh config

Create an SSH config for Azure VMs which can then be imported to 3rd party SSH clients.

az ssh config --file
              [--ip]
              [--private-key-file]
              [--public-key-file]
              [--resource-group]
              [--vm-name]

Examples

Give a resource group and VM for which to create a config, and save in a local file

az ssh config --resource-group myResourceGroup --vm-name myVm --file ./sshconfig

Give the public IP of a VM for which to create a config

az ssh config --ip 1.2.3.4 --file ./sshconfig

Required Parameters

--file

The file path to write the SSH config to.

Optional Parameters

--ip

The public IP address of the VM.

--private-key-file

The RSA private key file path.

--public-key-file

The RSA public key file path.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--vm-name

The name of the VM.

az ssh vm

SSH into Azure VMs.

az ssh vm [--ip]
          [--private-key-file]
          [--public-key-file]
          [--resource-group]
          [--vm-name]

Examples

Give a resource group and VM to SSH to

az ssh vm --resource-group myResourceGroup --vm-name myVm

Give the public IP of a VM to SSH to

az ssh vm --ip 1.2.3.4

Optional Parameters

--ip

The public IP address of the VM.

--private-key-file

The RSA private key file path.

--public-key-file

The RSA public key file path.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--vm-name

The name of the VM.