Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Suppose I ssh to a server in Windows machine and I want to scp file myLocalComp:someDir, is there something automatically built-in or do I need to set up a SSHD for this in Windows?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

If you type scp on the remote server, you will need indeed an sshd server on the windows side for scp to be able to make an SSH connection from the remote server (where scp is) to your computer and then transfer the file.

Alternatively, if you have SSH access to this remote server, you could use a tool like WinSCP which will give you the possibility to retrieve a file from this server over SSH in a way very similar to FTP and without the need to install an SSH server on your side.

Edit: I forgot to mention pscp which is a command-line tool made by the same authors as Putty and available on the official Putty download page. I personally prefer to use WinSCP but pscp will do the work too.

share|improve this answer
    
...cannot understand pscp, when I click it. It closes automatically? How am I supposed to use it or does it install itself somewhere? –  user114739 Feb 7 '12 at 17:46
    
Hi hhh, pscp is a command-line tool as specified in the documentation available on the official website : the.earth.li/~sgtatham/putty/0.62/htmldoc/Chapter5.html#pscp If you are looking for a graphical tool, I suggest you to use WinSCP . –  Zertrin Feb 8 '12 at 20:07
    
yes, I got it running but I find this a bit unconfortable -- all this winscp and pscp. Seriously, no way to get scp or pscp to Cygwin or something else under one emulation? Now look I have CMD, Cygwin and Winscp -- well I can do things with them but it is much slower than a full-blown *ix tools. I would like to get pscp to work in Cygwin and CMD automatically, people are really supposed to create env vars or how to do it in W? Feels too hxckish to me... what about so-called "powershell", does it handle things under one emulation? –  user114739 Feb 8 '12 at 21:19
    
You didn't say you had Cygwin installed ! And i didn't mentionned it because I think it's even more "hxckish" as you say if your intention was only to transfer a file. In this case you can install scp under Cygwin if not already done (re-run setup.exe and select scp package) and use scp like you would do on an *ix system. –  Zertrin Feb 9 '12 at 0:24
1  
A quick search (cygwin scp) with my favorite search engine enable me to find that the ssh and scp commands are provided with the openssh package of the Cygwin setup : question-defense.com/2010/01/07/… –  Zertrin Feb 9 '12 at 11:39
show 2 more comments

Download PSCP from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

This is a windows application.

You can then do some like this scenario.

SOURCE FILES /home/user/documents/* DESTINATION d:\backup\user\documents

pscp -r user@192.168.x.y:/home/user/documents/* d:\backup\user\documents

share|improve this answer
    
where am I supposed to write this command? When I click pscp, it closes?! –  user114739 Feb 7 '12 at 17:47
    
Open up command prompt and navigate to the directory where you have pscp saved. You can then use the above command to copy the files. –  kobaltz Feb 7 '12 at 23:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.