# Specify the transfer direction before copying Azure VM files with SCP

> DSE recommends writing the source, destination, and intended direction into the transfer request before constructing the command.

- Canonical URL: https://update.dsesecurity.com/updates/dse-20260917-018-specify-the-transfer-direction-before-copying-azure-vm-files-with-scp/
- Publisher: Detection Systems & Engineering (DSE Security)
- Author: DSE Security Editorial Team
- Published: 2026-09-17T16:34:42+00:00
- Modified: 2026-09-17T16:35:03+00:00
- Last reviewed by DSE: 2026-09-17
- Resource type: Guide
- DSE priority: Information
- Topics: IT
- Reading time: 1 minutes

## What you need to know

DSE recommends writing the source, destination, and intended direction into the transfer request before constructing the command.

## Potentially affected

This guide is for an operator preparing a workstation-to-VM file transfer or collecting a directory of VM logs using SCP.

## DSE recommendation

DSE recommends writing the source, destination, and intended direction into the transfer request before constructing the command.

## Article

## Source facts

Microsoft documents SCP transfers in both directions between a workstation and an Azure VM, with SSH enabled on the VM and an SCP client on the workstation. SCP relies on SSH for authentication and encrypted transport; the documented directory-download example uses the recursive option. [Microsoft Learn](https://learn.microsoft.com/en-us/azure/virtual-machines/copy-files-to-vm-using-scp)

## Applicability

This guide is for an operator preparing a workstation-to-VM file transfer or collecting a directory of VM logs using SCP.

## DSE recommendation

DSE recommends writing the source, destination, and intended direction into the transfer request before constructing the command. Identify the remote user and host separately from the remote directory. For a log collection, agree which directory is in scope and where the local copy belongs. Use a nonsensitive test file first, and arrange an appropriate destination for any confidential material before moving the real files.

## Verification

Compare the resulting file names and directory structure with the approved request. Confirm that the copy appeared on the intended side of the connection and that the expected files can be read. Record incomplete or unexpected transfers for investigation, and remove temporary test material only after the destination has been checked.

## Official references

- [Microsoft: Use SCP to move files to and from a VM – Azure Virtual Machines | Microsoft Learn](https://learn.microsoft.com/en-us/azure/virtual-machines/copy-files-to-vm-using-scp)

## Primary reference

- Name: Use SCP to move files to and from a VM - Azure Virtual Machines | Microsoft Learn
- Authority: Microsoft Learn
- URL: https://learn.microsoft.com/en-us/azure/virtual-machines/copy-files-to-vm-using-scp
- Source publication date: Not stated by the source

## Citation and use

Preferred citation: “Specify the transfer direction before copying Azure VM files with SCP,” DSE Security, https://update.dsesecurity.com/updates/dse-20260917-018-specify-the-transfer-direction-before-copying-azure-vm-files-with-scp/
Publishing principles: https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/
Usage and citation policy: https://update.dsesecurity.com/usage/
Copyright © 2026 Detection Systems & Engineering. All rights reserved.
