Muokkaa

Jaa


Windows VMs - copy and paste via Bastion

This article helps you copy and paste text to and from virtual machines when using Azure Bastion.

Prerequisites

Before you proceed, make sure you have the following items.

  • A virtual network with Azure Bastion deployed.
  • A Windows virtual machine deployed to your virtual network.

Configure the bastion host

By default, Azure Bastion is automatically enabled to allow copy and paste for all sessions connected through the bastion resource. You don't need to configure anything extra. You can disable this feature for web-based clients on the configuration page of your Bastion resource if your Bastion deployment uses the Standard SKU or higher.

  1. To view or change your configuration, in the portal, go to your Bastion resource.
  2. Go to the Configuration page.
    • To enable, select the Copy and paste checkbox if it isn't already selected.
    • To disable, clear the checkbox. Disable is only available with the Standard SKU or higher. You can upgrade the SKU if necessary.
  3. Apply changes. The bastion host updates.

Copy and paste

For browsers that support the advanced Clipboard API access, you can copy and paste text between your local device and the remote session in the same way you copy and paste between applications on your local device. For other browsers, you can use the Bastion clipboard access tool palette. Note that copy and paste isn't supported for passwords.

Note

Only text copy/paste is currently supported.

Advanced Clipboard API browsers

  1. Connect to your virtual machine.
  2. For direct copy and paste, your browser might prompt you for clipboard access when the Bastion session is being initialized. Allow the web page to access the clipboard.
  3. You can now use keyboard shortcuts as usual to copy and paste. If you're working from a Mac, the keyboard shortcut to paste is SHIFT-CTRL-V.

Non-advanced Clipboard API browsers

To copy text from your local computer to a virtual machine, use the following steps.

  1. Connect to your virtual machine.

  2. Copy the text/content from the local device into your local clipboard.

  3. On the virtual machine, you'll see two arrows on the left side of the session screen about halfway down. Launch the Bastion Clipboard access tool palette by selecting the two arrows.

  4. Copy the text from your local computer. Typically, the copied text automatically shows on the Bastion clipboard access tool palette. If it doesn't show up on the tool palette, then paste the text in the text area on the tool palette. Once the text is in the text area, you can paste it to the remote session.

    Screenshot shows the clipboard for text copied in Bastion.

  5. If you want to copy the text from the virtual machine to your local computer, copy the text to the clipboard access tool. Once your text is in the text area on the palette, paste it to your local computer.

Next steps

For more virtual machine features, see About VM connections and features.