fnord / Illuminatus,
2. "ssh -V" shows: Sun_SSH_1.1.1, SSH protocols 1.5/2.0, OpenSSL
3. Good to know!!
4. DataONTAP (NetApp OS)
5. I initially looked at the version of the SFTP.pm, so I just put it in here. Prolly extra info...
6. Yes, and one thing I forgot to mention is if I re-run the job, the sftp will go through. It also worked completely fine when ran daily on our test server. But also the same symptom on our dev box... (almost seems like it's only the first connection of the day, or maybe within 24hrs of last connection but it sounds ridiculous and I have no proof...)
7. I wouldn't know how to do that, or if I can. Since, I'm in a corporation and peons don't have access to anything, much less production. I'm just not sure. I mean, for us, in order to install a new Perl module it's 2 layers removed and we HOPE we get a knowledgeable SA...
my $ssherr = File::Temp->new or die "File::Temp->new failed";
open my $stderr_save, '>&STDERR' or die "unable to dump STDERR";
open STDERR, '>&'.fileno($ssherr);
my $sftp = Net::SFTP::Foreign->new(
host => $properties{RemoteHostName},
user => $rmtUser, password => $rmtPass
, timeout => 10, more=> '-v'
, queue_size => 16);
open STDERR, '>&'.fileno($stderr_save);
if ($sftp->error) {
print "sftp error: ".$sftp->error."\n";
seek($ssherr, 0, 0);
while (<$ssherr>) {
print "captured stderr: $_";
}
$endprogram = 1;
}
close $ssherr;
if ($endprogram) { exit($endprogram); }
if (!$sftp->setcwd($properties{RemoteDirPath})) {
print "File Transfer - unable to change directory: "
. $sftp->error;
exit(1);
}
if (!$sftp->get($properties{RemoteFileName}, "$fileTo")) {
print "File Transfer - get failed: " . $sftp->error;
exit(1);
}
| [reply] [d/l] |