复制并粘贴到虚拟机:Azure BastionCopy and paste to a virtual machine: Azure Bastion

本文可帮助你在使用 Azure Bastion 时将内容复制并粘贴到虚拟机,以及从中进行复制和粘贴。This article helps you copy and paste text to and from virtual machines when using Azure Bastion. 使用 VM 之前,请确保已按照创建 Bastion 主机的步骤进行操作。Before you work with a VM, make sure you have followed the steps to Create a Bastion host. 然后,连接到要通过 RDPSSH 使用的 VM。Then, connect to the VM that you want to work with using either RDP or SSH.

对于支持高级剪贴板 API 访问的浏览器,可以使用在本地设备上的应用程序之间进行复制和粘贴的相同方式在本地设备与远程会话之间复制和粘贴文本。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. 对于其他浏览器,可以使用 Bastion 剪贴板访问工具面板。For other browsers, you can use the Bastion clipboard access tool palette.

备注

目前仅支持文本复制/粘贴。Only text copy/paste is currently supported.

允许剪贴板

仅支持文本复制/粘贴。Only text copy/paste is supported. 对于直接复制和粘贴,浏览器可能会在 Bastion 会话进行初始化时提示你它需要访问剪贴板。For direct copy and paste, your browser may prompt you for clipboard access when the Bastion session is being initialized. 允许网页访问剪贴板。Allow the web page to access the clipboard.

复制到远程会话Copy to a remote session

使用 Azure 门户连接到虚拟机后,请完成以下步骤:After you connect to the virtual machine using the Azure portal , complete the following steps:

  1. 将本地设备中的文本/内容复制到本地剪贴板。Copy the text/content from the local device into local clipboard.

  2. 在远程会话期间,通过选择两个箭头启动 Bastion 剪贴板访问工具面板。During the remote session, launch the Bastion clipboard access tool palette by selecting the two arrows. 这些箭头位于会话的左中位置。The arrows are located on the left center of the session.

    允许剪贴板

    允许剪贴板

  3. 通常,已复制的文本会自动显示在 Bastion 复制粘贴面板上。Typically, the copied text automatically shows on the Bastion copy paste palette. 如果文本不在那里,则将文本粘贴到面板上的文本区域中。If your text is not there, then paste the text in the text area on the palette.

  4. 文本位于文本区域中后,可以将其粘贴到远程会话。Once the text is in the text area, you can paste it to the remote session.

    允许剪贴板

从远程会话复制Copy from a remote session

使用 Azure 门户连接到虚拟机后,请完成以下步骤:After you connect to the virtual machine using the Azure portal , complete the following steps:

  1. 将远程会话中的文本/内容复制到远程剪贴板(使用 Ctrl-C)。Copy the text/content from the remote session into remote clipboard (using Ctrl-C).

    允许剪贴板

  2. 在远程会话期间,通过选择两个箭头启动 Bastion 剪贴板访问工具面板。During the remote session, launch the Bastion clipboard access tool palette by selecting the two arrows. 这些箭头位于会话的左中位置。The arrows are located on the left center of the session.

    允许剪贴板

  3. 通常,已复制的文本会自动显示在 Bastion 复制粘贴面板上。Typically, the copied text automatically shows on the Bastion copy paste palette. 如果文本不在那里,则将文本粘贴到面板上的文本区域中。If your text is not there, then paste the text in the text area on the palette.

  4. 文本位于文本区域中后,可以将其粘贴到本地设备。Once the text is in the text area, you can paste it to the local device.

    允许剪贴板

后续步骤Next steps

阅读 Bastion 常见问题解答Read the Bastion FAQ.