Net :: módulo de erro OpenSSH

1

Sou novo no script CGI. Estou tentando conectar-me a outro servidor usando o Net :: OpenSSH, mas dando o seguinte erro

#!/tools/openbin/perl/5.16.3/sparc-sun-solaris8/bin/perl

use strict;
use warnings;
use Net::OpenSSH;

my $host ="**********";
my $user_name = "*******";
my $password_value = "*********";
my $ssh = Net::OpenSSH->new(host => $host, user => $user_name, password => $password_value);
$ssh->error and die "SSH connection failed: " . $ssh->error;

Isso está causando o seguinte erro:

command-line: line 0: Bad configuration option: ServerAliveInterval
SSH connection failed: unable to establish master SSH connection: bad password or master process exited unexpectedly at ./test.pl line 11.

    
por Hemant Chowdary 06.10.2017 / 08:05

1 resposta

1

De acordo com a documentação do Net :: OpenSSH :

The SSH client bundled with Solaris is an early fork of OpenSSH that does not provide the multiplexing functionality required by Net::OpenSSH. You will have to install the OpenSSH client.

Precompiled packages are available from Sun Freeware (http://www.sunfreeware.com). There, select your OS version an CPU architecture, download the OpenSSH package and its dependencies and install them. Note that you do not need to configure Solaris to use the OpenSSH server sshd.

Ensure that OpenSSH client is in your path before the system ssh or alternatively, you can hardcode the full path into your scripts as follows:

$ssh = Net::OpenSSH->new($host,
                     ssh_cmd => '/usr/local/bin/ssh');

AIX and probably some other unixen, also bundle SSH clients lacking the multiplexing functionality and require installation of the real OpenSSH.

    
por 06.10.2017 / 13:33

Tags