with password prompt. However the following perl script net_scp.pl doesn't work.scp local_file user@windows_host:/dir
The error msg is: Problem performing scp: lost connection at ./net_scp.pl line 28. The line 28 is the last line above. But the same username and password worked fine on the command line. Any help will be greatly appreciated. Thanks much.use strict; use warnings; use Net::SCP; my $file = 'xyz.txt'; my $destdir = '/dir'; my $host = 'xxx.xxx.xxx.xx'; my $user = 'user'; my $pass = 'pass'; my $scpe = Net::SCP::Expect->new(host => $host, user => $user, password => $pass) || die "Can not make connection to: $host\n"; $scpe->scp($file,$destdir) || die "can't scp: $!\n";
-----Inline Attachment Follows----- ------------------------------------------------------------------------------ RSA® Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 -----Inline Attachment Follows----- _______________________________________________ Ssh-sftp-perl-users mailing list Ssh-sftp-perl-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users Go to Previous message | Go to Next message | Back to Messages | Full Headers Reply Reply All Forward Forward Mail Search WelcomeInboxNewFoldersMail Options
In reply to Net::SCP can't connect to Windows server by perlfun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |