|Subject:||password in new does not handle stderr properly|
I'm using openssh 5.1 with Net::SFTP::Foreign. My new looks like this: my %sftp_args = ( host => $host, user => $user, password => $pass, ssh_cmd => '/opt/perl588/site/openssh5.1/bin/ssh', more => ['-o'=> 'StrictHostKeyChecking=no', '-o' => 'NumberOfPasswordPrompts=1'], ssh_cmd_interface => 'ssh', ) my $sftp = Net::SFTP::Foreign->new(%sftp_args); If I run with a bad password, and exit if $sftp->error, I get this output without printing it: 'Permission denied (publickey,keyboard-interactive).' I have no objection that expect is not handling a bad password since I can use SSH's 'NumberOfPasswordPrompts option. But I need expect to trap the STDERR about why it failed. Right now, it's not and it's simply being thrown out during run. Do you know if this would be an easy fix?