Skip to content

Commit e18f68a

Browse files
authored
Merge pull request #268508 from cherylmc/bastion-native-client
remove download limitations.
2 parents ce50dfb + aa9ee12 commit e18f68a

File tree

1 file changed

+12
-22
lines changed

1 file changed

+12
-22
lines changed

articles/bastion/vm-upload-download-native.md

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@ description: Learn how to upload or download files using Azure Bastion and a nat
55
author: cherylmc
66
ms.service: bastion
77
ms.topic: how-to
8-
ms.date: 06/13/2023
8+
ms.date: 03/11/2024
99
ms.author: cherylmc
1010
# Customer intent: I want to upload or download files using Bastion.
1111

1212
---
1313

1414
# File transfer using a native client
1515

16-
Azure Bastion offers support for file transfer between your target VM and local computer using Bastion and a native RDP or native SSH client. To learn more about native client support, refer to [Configure Bastion native client support](native-client.md). While it may be possible to use third-party clients and tools to upload or download files, this article focuses on working with supported native clients.
16+
Azure Bastion offers support for file transfer between your target VM and local computer using Bastion and a native RDP or native SSH client. To learn more about native client support, refer to [Configure Bastion native client support](native-client.md). While it might be possible to use third-party clients and tools to upload or download files, this article focuses on working with supported native clients.
1717

1818
* File transfers are supported using the native client only. You can't upload or download files using PowerShell or via the Azure portal.
19-
* To both [upload and download files](#rdp), you must use the Windows native client and RDP.
20-
* You can [upload files](#tunnel-command) to a VM using the native client of your choice and either RDP or SSH.
19+
* You can upload and download files using the Windows native client and RDP.
20+
* You can upload and download files to a VM using the native client of your choice and either RDP or SSH.
2121
* This feature requires the Standard SKU. The Basic SKU doesn't support using the native client.
2222

2323
## Prerequisites
2424

2525
* Install Azure CLI (version 2.32 or later) to run the commands in this article. For information about installing the CLI commands, see [Install the Azure CLI](/cli/azure/install-azure-cli) and [Get Started with Azure CLI](/cli/azure/get-started-with-azure-cli).
2626
* Get the Resource ID for the VM to which you want to connect. The Resource ID can be easily located in the Azure portal. Go to the Overview page for your VM and select the *JSON View* link to open the Resource JSON. Copy the Resource ID at the top of the page to your clipboard to use later when connecting to your VM.
2727

28-
## <a name="rdp"></a>Upload and download files - RDP
28+
## <a name="rdp"></a>Upload and download files - Windows client and RDP
2929

3030
The steps in this section apply when connecting to a target VM from a Windows local computer using the native Windows client and RDP. The **az network bastion rdp** command uses the native client MSTSC. Once connected to the target VM, you can upload and download files using **right-click**, then **Copy** and **Paste**. To learn more about this command and how to connect, see [Connect from a Windows native client](connect-vm-native-client-windows.md).
3131

@@ -47,16 +47,12 @@ The steps in this section apply when connecting to a target VM from a Windows lo
4747
az network bastion rdp --name "<BastionName>" --resource-group "<BastionResourceGroupName>" --target-resource-id "<VMResourceId>"
4848
```
4949
50-
1. Once you sign in to your target VM, the native client on your computer will open up with your VM session. You can now transfer files between your VM and local machine using right-click, then **Copy** and **Paste**.
50+
1. Once you sign in to your target VM, the native client on your computer opens up with your VM session. You can now transfer files between your VM and local machine using right-click, then **Copy** and **Paste**.
5151
52-
## <a name="tunnel-command"></a>Upload files - SSH and RDP
52+
## <a name="tunnel-command"></a>Upload and download files - SSH and RDP
5353
54-
The steps in this section apply to native clients other than Windows, as well as Windows native clients that want to connect over SSH to upload files.
55-
This section helps you upload files from your local computer to your target VM over SSH or RDP using the **az network bastion tunnel** command. To learn more about the tunnel command and how to connect, see [Connect from a Linux native client](connect-vm-native-client-linux.md).
56-
57-
> [!NOTE]
58-
> This command can be used to upload files from your local computer to the target VM. File download is not supported.
59-
>
54+
The steps in this section apply to native clients other than Windows, and Windows native clients that want to connect over SSH to upload files.
55+
This section helps you upload or download files from your local computer to your target VM over SSH or RDP using the **az network bastion tunnel** command. To learn more about the tunnel command and how to connect, see [Connect from a Linux native client](connect-vm-native-client-linux.md).
6056
6157
1. Sign in to your Azure account. If you have more than one subscription, select the subscription containing your Bastion resource.
6258
@@ -72,18 +68,12 @@ This section helps you upload files from your local computer to your target VM o
7268
az network bastion tunnel --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-resource-id "<VMResourceId>" --resource-port "<TargetVMPort>" --port "<LocalMachinePort>"
7369
```
7470
75-
1. Open a second command prompt to connect to your target VM through the tunnel. In this second command prompt window, you can upload files from your local machine to your target VM using the following command:
71+
1. Open a second command prompt to connect to your target VM through the tunnel. In this second command prompt window, you can specify to upload or download files. For a list of SCP commands and parameters, see [SCP](https://www.commandlinux.com/man-page/man1/scp.1.html).
7672
77-
```azurecli
78-
scp -P <LocalMachinePort> <local machine file path> <username>@127.0.0.1:<target VM file path>
79-
```
80-
81-
1. Connect to your target VM using SSH or RDP, the native client of your choice, and the local machine port you specified in Step 3.
82-
83-
For example, you can use the following command if you have the OpenSSH client installed on your local computer:
73+
For example, you can upload files from your local computer to your target VM using the following command:
8474
8575
```azurecli
86-
ssh <username>@127.0.0.1 -p <LocalMachinePort>
76+
scp -P <LocalMachinePort> <local machine file path> <username>@127.0.0.1:<target VM file path>
8777
```
8878
8979
## Next steps

0 commit comments

Comments
 (0)