Security Basics mailing list archives

Re: SCP win2K3 to RH9 troubles


From: Kelly Martin <kel () securityfocus com>
Date: Wed, 03 Nov 2004 16:52:55 -0700

Bénoni MARTIN wrote:

I have to perform a daily scp from a Linux box (RH 9) to a Win2K3 box. The files and their directories change everyday, 
so I have to wrap scp in a script (Shell or Perl as I like both :) ).

I tried to do this with a simple and usual command like:
        scp /..path_to_my_file.../ user@win2K3Box:/..path/
but could not manage to make if work (no file downloaded), and no error message available even in verbose mode.
From the scp you listed above, it looks like you're trying to scp *into* the Windows 2003 machine. Unless you're running cygwin or similar, there's no daemon that will be listening.

I suspect you meant to reverse the parameters, above, and fetch the Linux files from the Windows machine. In that case you probably want to look at SSH key pairs to improve security and also allow for automation of your script. Below are some articles I would suggest to show you how to do this.

For the Red Hat box:
"SSH Host Key Protection" - http://www.securityfocus.com/infocus/1806
"SSH User Identities" - http://www.securityfocus.com/infocus/1810

For the Windows box:
"Using PuTTYgen, the PuTTY key generator" - http://the.earth.li/~sgtatham/putty/0.56/htmldoc/Chapter8.html#C8

I tried then with sftp and psftp from windows, but cannot manage the trouble of avoiding a prompt asking me the 
password ...
Don't put the password in your scripts, obviously. Try something like Pageant, Putty's version of ssh-agent:

"Using Pagent for authentication" - http://the.earth.li/~sgtatham/putty/0.56/htmldoc/Chapter9.html#C9


Regards,

Kelly Martin



Current thread: