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?
2 Answers
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.
- 373
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
- 14,824
-
-
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 07 '12 at 23:48
If you are looking for a graphical tool, I suggest you to use WinSCP .
– Zertrin Feb 08 '12 at 20:07In 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 09 '12 at 00:24opensshpackage of the Cygwin setup : http://www.question-defense.com/2010/01/07/how-to-install-scp-and-ssh-on-windows-7-using-cygwin – Zertrin Feb 09 '12 at 11:39