How to Transfer Files to a Linux VPS using SSH?

While file transfer between windows systems is easy and straightforward, it is a little tricky when it comes to transferring files between a windows system and a Linux VPS. However, it can be done easily using SSH. In Windows, you can just copy/paste a file or folder to a different Windows VPS or PC.

We will show you how to transfer files from a windows system to a Linux VPS running Ubuntu OS. We will be using PuTTy, a popular SSH client to transfer the files.

Here are the steps you need to follow:

Transferring files between a local PC and Linux VPS:

Step 1: Download PuTTy and PuTTy SCP (pscp).

  • You need to download PuTTy, and PuTTY SCP (pscp) if you don’t have it in your system.
  • Ensure pscp.exe is in your system’s PATH or navigate to its directory using the command prompt.

Step 2: Transferring files using “pscp”.

    • Open Command Prompt. You can either search and open it or just use Windows key + R, then type cmd to open it.
    • Now navigate to the directory containing the “pscp.exe”. You can do that by running this command in the CMD.
      $ cd C:\Program Files\PuTTY

  • Use the following command to transfer the file to the Linux VPS

Command format:
$ pscp path\to\local\file username@VPS_IP:/path/to/remote/directory

To transfer C:\Users\YourUser\Documents\transfer.txt to /home/your_vps_user/ on the VPS, use this command:
$ pscp C:\Users\YourUser\Documents\transfer.txt

If your VPS’s IP is: and your files name is: transfer_test.txt and the VPS’s username is root, then the command will look like this:
$ pscp “C:\Users\farha\Documents\transfr\transfer_test.txt” root@

If you want to move a folder to the linux VPS, then the command will look a bit different.

Command format:
pscp -r path\to\local\folder username@

If your folder’s name is “transfr”, then the actual command will look like this:
pscp -r “C:\Users\farha\Documents\transfr” root@

Step 3: Verify if the file has been transferred successfully.

  • If you want to check if the file has been transferred, then open PuTTy and login to the VPS.
  • Then Navigate to the directory where you transferred it.
  • Go to the directory by using $ cd home
  • Then use this command: $ ls

If you want to remove the file, then use the “rm” command.

Step 4: Removing a file or directory if needed.

    • $ rm tranfer_test.txt
    • Then use this command: $ ls

      If you want to remove a directory, then use “rm -r” command
    • $ rm -r transfr
    • If you type $ ls again, you will no longer see the file or directory there.

This is how you can easily transfer files from your Windows VPS or PC to a Linux VPS via SSH.

Transferring files between two Linux VPS:

You can also transfer files from one Linux VPS to another Linux VPS. For that follow the instructions given below:

  • Open Command Prompt
  • Login to your Source VPS that contains your files, then type this command and hit enter:
    $ ssh root@source_vps_ip
  • Enter your VPS password. (You may be asked to type yes or y to confirm the connection before entering the password).
  • Determine which file you want to transfer and the location/directory of the file.
  • You can use the “scp” command to move files between a source VPS and a destination VPS.
  • General Command format:
    $ scp “/home/folder1/filename.ext” root@destination_ip:/home/folder2/filename.ext

Here “/home/folder1/filename.ext” is the location/directory of the file in the source VPS. This part is for the destination VPS “root@destination_ip:/home/folder2/filename.ext”.
Here root@destination_ip is the username@destination_ip, :”/home/folder2/filename.ext” is the destination directory to transfer the file/folder.

For Example, If the Destination VPS’s IP is: and the username is “root”; and the file is in “home/transfr” directory in the Source VPS (, then use the following command to transfer the file:
$ scp “/home/transfr/new_file.txt” root@

If you check in this Destination VPS: you will see the file there.

If you want to transfer the whole folder/directory, then just add “-r” after “scp”.
The command will look something like this:
$ scp -r “/home/transfr/” root@

If you check again, you will see the folder there now.

You can transfer files from VPS ( to VPS ( too. Just change the IP and directory name accordingly.
$ scp “/file name” root@
For folder/directory:
$ scp -r “/Folder or directory name/” root@
This is how you can transfer files between two different Linux VPS easily.

FireVPS offers both Windows VPS/RDP and Linux VPS. Buy Windows VPS/RDP and Ryzen Linux VPS from FireVPS for your VPS hosting needs. If you are still having any issues or confusion, please feel free to knock us on Live Chat from our website. Our support team is always ready to help you.
FireVPS / Live Chat / Skype /

Need Domain Name?

85% Promo on Domain Names

Dedicated RDP

Poland RDP 50% recurring discount!

Recent Post

How to Test Network Speed on Linux VPS

We usually check the internet speed to verify if the network is okay or if we are getting what we have paid for. For Windows, Android or other GUI (Graphical User Interface) based OS, it is pretty simple. You can just open a web browser and type “speed test”. Many...

How to Install Magento on Ryzen/Linux VPS – FireVPS

Installing Magento on a Ryzen-powered Linux VPS can significantly enhance your e-commerce platform's performance. Magento is a popular open-source e-commerce platform, and with FireVPS, you can leverage powerful Ryzen processors to ensure your online store runs...

How to buy VPS with BTC or Bitcoin?

The long awaited payment method is here! Yes, you guessed it right! FireVPS has added Cryptocurrency payment options for its products and services. Now you can easily purchase your desired product (RDP/VPS) with your BTC or other available Cryptocurrency wallets....