Copy data from a remote Linux box to my Windows desktop

2

3

I use Putty to login to the remote server and then set the environment and change the path to a particular directory. Now from this dir, I need to copy a folder to my desktop which is Windows?

How can I achieve this ?

Some of my failed attempts are as follows

scp -r remote_foldername srao@my_ipaddress:C:\srao\Users\Desktop

So from the remote server which is to be copied through putty, to my_username_in_windows@ip_address:path to destination

Sanjay Rao

Posted 2012-10-08T02:26:15.747

Reputation: 123

Please refer answer from here: How to transfer files from Linux to Windows machine and vice versa Hope it helps!!!

– SH' – 2017-06-12T07:00:53.390

1

This is not a programming question, and is off topic for StackOverflow. The FAQ has more information about the types of questions that should be asked here. Voting to close as off topic and migrate to a more suitable site.

– Ken White – 2012-10-08T03:06:47.933

Answers

6

Try WinSCP. If you can ssh into a machine, it can transfer files.

Peter Lundgren

Posted 2012-10-08T02:26:15.747

Reputation: 191

Actually i found this right after posting the Qn and it worked as a charm. – Sanjay Rao – 2012-10-09T03:53:05.527

5

As Peter Lundgren suggests, WinSCP is a good choice -- for scp with a graphical user interface.

To copy from the Windows command line (not from the PuTTY shell on your remote Linux machine), PuTTY uses pscp. You may have pscp already installed with PuTTY (e.g. in C:\Program Files\PuTTY or C:\Program Files (x86)\PuTTY), or it can be dowloaded from the PuTTY Download Page. It uses syntax like standard scp:

 C:\Program Files (x86)\PuTTY>pscp -r mylinuxuser@remotelinuxbox:/path/to/foldername C:\path\to\windows\destination

Lars Rohrbach

Posted 2012-10-08T02:26:15.747

Reputation: 439

1

There are couple of options available here:

  1. As pointed by Peter Lundgren and Lars Rohrbach, you can use winSCP - a GUI secure copy protocol tool

  2. Another option would be to install cygwin on your windows machine and use scp to 'download/upload' files from your remote Linux host. e.g.

scp -i /path/to/pem/file $SRC $DESTINATION

  1. One drawback while using scp would be unavailability of resume support in case you face connection stallings. So you can use rsync with --partial flag. e.g.

rsync --partial --progress -e "ssh -i /path/to/pem/file" user@host:/path/to/files/to/transfer /local/path

GauravLuthra

Posted 2012-10-08T02:26:15.747

Reputation: 111