[Ssh-sftp-perl-users] Error Handling / Log4Perl and Net::SFTP
Brought to you by:
dbrobins
|
From: Linke M. (K. 11) <mar...@cr...> - 2009-08-06 07:39:07
|
Hi,
I'm trying to use Net::SFTP and log the warnings/errors via Log4Perl,
but the script always dies when connecting:
if ($debug =~ /VERBOSE/g) {$debug=1;}
my $sftp = Net::SFTP->new($sftpserver, user=>$sftpuser, debug=>$debug)
or $logger->logdie ("Cannot connect to $sftpserver as $sftpuser");
2009-08-06 09:10:50 [sftp.pl:main] INFO> host name: xxx
2009-08-06 09:10:50 [sftp.pl:main] INFO> user name: xxx
2009-08-06 09:10:50 [sftp.pl:main] INFO> file name: xxx
2009-08-06 09:10:50 [sftp.pl:main] INFO> target directory: /xxx/
zus45a-5402: Reading configuration data /xxx/.ssh/config
zus45a-5402: Reading configuration data /etc/ssh_config
zus45a-5402: Connecting to xxx, port 22.
[...]
zus45a-5402: Trying pubkey authentication with key file '/xxx/id_dsa'
Received disconnect message: Too many authentication failures for xxx
at /app/CMpkg2/perl_588/lib/site_perl/5.8.8/Net/SSH/Perl/AuthMgr.pm
line 142
Is it possible to get the error back from the Net::SFTP->new call?
Thanks,
Markus
|