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

Posted February 12, 2016 59.5k views
Linux BasicsUbuntuLEMP

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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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