Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i want to transfer file from unix server to windows 2003 server i download copssh on windows 2003 and openssh is already installed in unix ... i execute the following command :- scp -r /file_in_unix/ user@windows_hostname:\c:\\

the following output appear in unix screen :-

100% |***************************************************************| 562 00:00

but when i go to see file in c drive i don't find anything :(

share|improve this question

closed as off topic by David Spillett, Chopper3 Oct 4 '10 at 11:34

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Closing as 'off topic' because there's no way to close as exact duplicate between sites. –  Chopper3 Oct 4 '10 at 11:34
add comment

2 Answers

up vote 1 down vote accepted

(copied from my answer to the question as cross-posted to SU at http://superuser.com/questions/195596/transfer-file-from-unix-to-windows)

The destination path looks wrong - to most unix shells the forward slash is an escape character not a path marker, so I'm guessing the file has dropped into the SSH user's home directory with an odd filename.

IIRC copssh is based on cygwin, so what you probably needed to run is:

scp -r /file_in_unix/ user@windows_hostname:/cygdrive/c/

An alternatives to copying to a SSH service on the Windows machine is to use a GUI client like WinSCP on the Windows box to login to the Unix machine and pull the files over that way - though this is not suitable if you are trying to automate the process.

If you have privileged access on the unix machine (i.e. you are, or can become via sudo or similar, root) and have the relevant support installed you could just copy the files onto a Windows share. You don't say what Unix you are using. For Ubuntu and similar checking that support is present and installing it if not can be done with sudo aptitude install smbfs, you can them mount a Windwos share with something like sudo mount -tcifs // /mnt/tmp -ousername=WindowsUserName (where is the IP address of the windows machine, depending on your network setup you may be able to refer to the machine by name rather than address). Once you've done that you can just use the basic file management tools (cp, mv, ...) to interact with that Windows share and call umount /mnt/tmp when you are done. You might want to choose a more meaningful mount point name than /mnt/tmp. You can leave the share mounted, of course, if the transfer of the data is to be automated/scheduled. This method does assume that the Unix machine can see the Windows machine's fileshares through any firewall arrangements that may exist between them.

share|improve this answer
add comment

scp -r /file_in_unix/ means that you want to copy the contents of a directory.

Maybe you wanted to write scp /tile_in_unix user@... instead.

If you wanted to copy the contents of the directory in the first place: have you checked if it is empty?

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.