user3914863
user3914863

Reputation: 41

"Bad configuration option: ServerAliveInterval" using Net::OpenSSH and Solaris SSH client

I'm trying to use Net::OpenSSH to connect to a remote host:

my $ssh = Net::OpenSSH->new(
    $ip_address,
    user => $user,
    password => $password,
    timeout => 3600,
    master_opts => [ -o => "StrictHostKeyChecking=no" ],
    ctl_dir => $ENV{HOME}
);

But I'm getting the following error:

command-line: line 0: Bad configuration option: ServerAliveInterval
Unable to connect to remote host: unable to establish master SSH connection: bad password or master process exited unexpectedly at t1.pl line 33.

I'm using the following version of the SSH client:

$ ssh -V
SSH Version Sun_SSH_1.0.1, protocol versions 1.5/2.0.

How can I fix this?

Upvotes: 2

Views: 2600

Answers (1)

ThisSuitIsBlackNot
ThisSuitIsBlackNot

Reputation: 24073

Net::OpenSSH doesn't support the Solaris SSH client. From the docs:

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.

Install the OpenSSH client and ensure that it appears before the system ssh in your path.

Alternatively, use the ssh_cmd option to new:

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

Upvotes: 1

Related Questions