Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Compute Cloud
    • All guides
      • Connecting to a VM via SSH
      • Exchanging files with VMs
      • Connecting to a VM via RDP
      • Connecting to a VM via PowerShell
      • Using Yandex Cloud from within a VM
      • Installing NVIDIA drivers
      • Recovering access to a VM
    • Viewing operations with resources
  • Yandex Container Solution
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes

In this article:

  • Exchanging files via SCP
  • Exchanging files via SFTP
  • Exchanging files using client applications
  1. Step-by-step guides
  2. Using a VM
  3. Exchanging files with VMs

Exchanging files with a Linux VM

Written by
Yandex Cloud
Updated at February 12, 2025
  • Exchanging files via SCP
  • Exchanging files via SFTP
  • Exchanging files using client applications

We recommend using SCP and SFTP for exchanging files with a Linux VM.

Both protocols use SSH tunneling for TCP connections to encrypt file transfers, delivering the same security and authentication level as SSH.

Files are transferred using the same key pair as the one used for connecting to a Linux VM via SSH.

Exchanging files via SCPExchanging files via SCP

To transfer a file named file1 from a local folder to a VM folder, run this command:

scp file1 <username>@<VM_IP_address>:<absolute_path_to_VM_folder>

To copy the file under a different name, specify a new file name in the destination address. For example, to save file1 to a remote folder as file1.txt, run this command:

scp file1 <username>@<VM_IP_address>:<absolute_path_to_VM_folder>/file1.txt

To copy the entire folder contents, use the -r key before the folder name:

scp -r <local_folder> <uername>@<VM_IP_address>:<absolute_path_to_VM_folder>

To change the file exchange direction, specify the remote address before the local one. For example, to download a file named file2.txt to your local computer, run this command:

scp <username>@server_ip:<absolute_path_to_VM_folder>/file2.txt <local_folder>

Exchanging files via SFTPExchanging files via SFTP

To use SFTP tools, establish a connection to a remote VM. To do this, run the following command:

sftp <username>@<VM_IP_address>

This command will switch the terminal to interactive mode on the remote server. Go to the folder you need on the remote VM by running this command:

cd <absolute_path_to_VM_folder>

To upload a file from your local computer to the selected folder on the remote VM, run this command:

put <path_to_local_computer_file>

To download a file from a remote VM, run this command:

get <path_to_VM_file>

To copy the entire folder, use the -r key in the put and get commands. For example, to copy all files from a local folder to a remote VM, run this command:

put -r <path_to_local_computer_folder>

Note

To copy files, the user must have write permissions for the folder on the destination server.

Exchanging files using client applicationsExchanging files using client applications

You can use the following client applications to exchange files:

  • WinSCP with SCP and SFTP support.
  • Filezilla with SFTP support.

Was the article helpful?

Previous
Connecting to a VM via SSH
Next
Connecting to a VM via RDP
Yandex project
© 2025 Yandex.Cloud LLC