> 
> ok... I'm writing a perl program that will use scp to copy a file from
> one machine to another securely.
> 
> The problem is that scp asks for the users password...  how can I have
> perl answer scp's request for a password...
> 
> by hand it looks like so;
> 
> $$scp -C test1111 [EMAIL PROTECTED]:test1111 
> [EMAIL PROTECTED]'s password:
> test1111             100%
> |*************************************************************
> ********|
> 0       --:-- ETA
> $$
> 
> I would like to run the command like:
> 
> system("scp -C test1111 [EMAIL PROTECTED]:test1111");
> 
> But how do I then feed it the password for user bob ?

I think that you can probably achieve this in a more secure way by altering
your scp/ssh configuration.  Having a quick look at the man page for my
version of scp (running under Cygwin on Windows NT), you can operate scp in
batch mode (by giving it the command line argument -B) which prevents it
from asking for passwords or pass phrases. I would guess that you would
still need an authentication mechanism in place though...

It is possible to configure scp/ssh so that instead of needing a password,
you use public/private key authentication. 'man ssh' and look at the section
on RSA authentication.

The advantage of this is that you don't need to store your password in plain
text anywhere on you system.

Hope this is of some use,

Gareth

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to