Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Azure Entra VM Remote SSH (az ssh)New to Visual Studio Code? Get it now.
Azure Entra VM Remote SSH (az ssh)

Azure Entra VM Remote SSH (az ssh)

Yang Han

|
1 install
| (0) | Free
Connect to Azure VMs over SSH using `az ssh` (Microsoft Entra certificates) and open them with Remote-SSH.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Azure VM SSH (az ssh)

A VS Code extension that connects to Azure Virtual Machines over SSH using the Azure CLI's az ssh command and opens them with Remote - SSH, so you can edit and run code on the remote VM directly from your IDE.

How it works

  1. You pick a subscription and a VM from a Quick Pick list (az vm list).
  2. The extension runs az ssh config to generate a per-VM SSH config file plus a short-lived Microsoft Entra SSH certificate.
  3. It adds an Include line to your ~/.ssh/config pointing at the generated file.
  4. It asks the Remote - SSH extension to open a window connected to that host.

Because the certificate is regenerated (with --overwrite) every time you connect, you always start with a fresh, valid credential.

Requirements

  • Azure CLI (az) on your PATH, with the ssh extension (az extension add --name ssh).
  • The Remote - SSH extension (installed automatically as a dependency).
  • For Microsoft Entra login: the target VM must have the AAD login extension installed and you need the Virtual Machine Administrator/User Login role.

Commands

Command Description
Azure VM SSH: Connect to VM (new window) Pick a VM and open it in a new Remote-SSH window.
Azure VM SSH: Connect to VM (current window) Same, but reuse the current window.
Azure VM SSH: Sign in to Azure (az login) Run az login.
Azure VM SSH: Select Azure Subscription Switch the active subscription.

Settings

Setting Description
azureVmSsh.sshConfigDir Where per-VM config + certs are written (default ~/.ssh/az-ssh).
azureVmSsh.privateKeyFile Private key path for local-user VMs (not Entra).
azureVmSsh.localUser Local user name to use with privateKeyFile.

Develop / run locally

npm install
npm run compile

Then press F5 ("Run Extension") to launch an Extension Development Host, and run one of the commands from the Command Palette.

Packaging

npm install -g @vscode/vsce
vsce package

This produces an installable .vsix.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft