Report this

What is the reason for this report?

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

Posted on February 12, 2016
Nay

By Nay

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:

C:\Users\Jonny\Desktop\Websitenw\Logo\image.png

Put in:

/usr/share/nginx/html/websitenw/images/

What is the command line in Putty?



This textbox defaults to using Markdown to format your answer.

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

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.

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: C:/Desktop/file.txt

private key: C:/Desktop/privatekey.ppk

destination on server: root@droplet_IP:/opt/tomcat/somefolder

then you should run this command:

pscp -i C:/Desktop/privatekey.ppk C:/Desktop/file.txt root@IP:/opt/tomcat/somefolder

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.