I´m trying with the following rows:
my $scpe = Net::SCP::Expect->new(user=>'$username',password=>'$password'. preserve=>1, recursive=>1, verbose=>1);
$scpe->scp('$hostname:/home/f/foobar/www/index.htm','foobar/index.htm');
This is giving me following error:
at /usr/lib/perl5/site_perl/5.8.1/Expect.pm line 733ease try again.
It look odd and I don´t know what is wrong...
Thanks for any help!
Regards,
Magnus
Now the script is executing but...
It will not use the correct username...
If I run the script as user root on my local server it tries to login with root. If i run the script as user foobar it will use the user foobar to login.
If I run the script as the same user that I want to copy the username is correct but it still ask me to enter password...
I´ve tried with scp -r -p foobar@foobar.org:/home/foobar/ .
and entered the password. Everything works...
Please help..
/Magnus