How to Use Putty pscp to Copy Files to/from a Remote Server

by

Hey there! Some links on this page may be affiliate links which means that, if you choose to make a purchase, I may earn a small commission at no extra cost to you. I greatly appreciate your support!

In this tutorial, you will learn how to copy files from Windows to a remote server, and vice versa from a remote server to Windows. To do this, you can use a free, open-source program called Putty Secure Copy or pscp, for short.

Please note that you will need to know the credentials (username and password) of the remote server for this to work properly.

Download PSCP

First download Putty Secure Copy from the official website here. You’ll want the 32 bit version if you do not have a 64 bit computer.

Download the pscp executable

This is a standalone executable, so you can run it from anywhere on your computer. For now, place it on your Desktop.

To use pscp on Windows, you have to execute it as a command through the command prompt. Open command prompt by searching for cmd in the start menu. In the command prompt window, change the directory to your desktop like this:

cd Desktop

You can use the dir command to list out the files and folder on your desktop:

dir

How to Copy Files from Local to Remote

In the command prompt, execute the following command to copy a local file called demo-file.zip into the /root/ directory of a remote server with IP address of 45.32.218.126.

pscp -P 22 demo-file.zip root@45.32.218.126:/root/

After hitting Enter, type or paste in the password when it prompts you.

How to Copy Files from Remote to Local

In the command prompt, execute the following command to copy a remote file on server with IP address of 45.32.218.126 called a-file.txt onto the desktop of your local computer.

pscp -P 22 root@45.32.218.126:/root/a-file.txt ~/Desktop/a-file.txt

After hitting Enter, type or paste in the password when it prompts you.


Meet Tony

With a strong software engineering background, Tony is determined to help as many people as possible start their online busines. Discover why Tony quit his hedge fund job to pursue this mission. You can send Tony a message here.

Leave a Comment