How I transfer local files using Putty to my remote server?

February 12, 2016 32.6k views
Linux Basics Ubuntu LEMP

I am using nginx - Ubuntu, and I would like know how put local files into my remote server.

Example the directory of my local file:


Put in:


What is the command line in Putty?

1 comment
5 Answers

You need another program, like Filezilla, to securely transfer files. See the tutorial on using Filezilla on DO.

by Pablo Carranza
This article will teach you how to use Filezilla to transfer and manage files securely on your VPS.
  • Thank you for your reply, I have Filezilla, but I wanna know how upload files of Windows to Linux through Putty (command line)…

    • @Nayara - Last time I looked, putty didn’t know how to use the ftp protocol directly. I know it can be used to establish an SSH tunnel for use with other programs outside of putty.

You will need to download an additional file called pscp.exe

Check out the guide here.

you can use VSFTP or FTP, or simplest way by using SCP. This will directly copy file from localhost to server

pscp -r your/local/directory/ userID@hostserver:/your/destination/directory

This works fine for me. I copied entire directory with all sub-directories from my local windows machine to linux server.

Depends upon the size of the directory, the time increases.

Here is what worked for me on Windows:

  1. Download Putty package
  2. Open cmd
  3. cd to the Putty’s folder - inside that folder pscp.exe file should reside
  4. Suppose we have these folders:

file to copy:

private key:

destination on server:

then you should run this command:

pscp -i C:/Desktop/privatekey.ppk C:/Desktop/file.txt root@IP:/opt/tomcat/somefolder
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!