sierpinski has asked for the wisdom of the Perl Monks concerning the following question:
This occurs on any reference to the $ssh object. Here are the commands that I'm running:SSHProcessError The ssh process was terminated. at line xxx
It will die on the first command after the run_ssh, no matter what it is, and I can't seem to trap the fact that the connection was broken immediately. I've tried using peek to search for 'connection closed' or the like, but still unsuccessful.my $ssh = Net::SSH::Expect->new ( host => "$current_server", user => "$user", raw_pty => 1 ); # test the login eval { $login_output = $ssh->run_ssh(); }; # I've tried to capture $@ or $! here but it never gives me an +ything useful ($ssh->read_all(2) =~ />\s*|$\s*\z/) or die "where's the remot +e prompt?"; $ssh->exec("stty raw -echo");
|
|---|