Calling Another Application From Perl



I want to call scp to transfer a file to another server.

open(OUT, "|scp $backup_file $user\@$server:./");
print OUT "$pass\n";
close OUT;

This does not work though. SCP does not allow to specify the password
rather it prompts for it. Is there anyway to answer the prompt for password
with perl?

M




.



Relevant Pages

  • Re: scp without any prompts
    ... SH> I have never used SCP before, but I am working on a perl script to ... SH> prompts me for the password for accnt2@host2. ... SH> off password authentication, but I am still being prompted to ...
    (comp.security.ssh)
  • scp without any prompts
    ... I have never used SCP before, but I am working on a perl script to ... accnt2@host2 the scp program prompts me for the passkey, ... password authentication, but I am still being prompted to enter both the ...
    (comp.security.ssh)
  • Re: Calling Another Application From Perl
    ... You can probably configure scp to use stored ssh keys, no passwords ... rather it prompts for it. ...
    (comp.lang.perl.misc)
  • Re: smbfs 2 GB file size limit
    ... Was your issue with reading from or writing to a SMB share? ... What is the server software and OS version? ... What error message are you getting from your FreeBSD client? ... Did you really mean to say scp or cp? ...
    (freebsd-questions)
  • Re: smbfs 2 GB file size limit
    ... >> Was your issue with reading from or writing to a SMB share? ... >> What is the server software and OS version? ... > Did you really mean to say scp or cp? ... > specifying it's dialect capabilities in the smb negotiation. ...
    (freebsd-questions)