gpt4 book ai didi

perl - 使用Net::OpenSSH和Solaris SSH客户端的“Bad configuration option: ServerAliveInterval”

转载 作者:行者123 更新时间:2023-12-02 14:03:28 31 4
gpt4 key购买 nike

我正在尝试使用 Net::OpenSSH 连接到远程主机:

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

但我收到以下错误:
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.

我正在使用以下版本的SSH客户端:

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

我怎样才能解决这个问题?

最佳答案

Net::OpenSSH不支持Solaris SSH客户端。从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,并确保它在您的路径中出现在系统 ssh之前。

或者,对 ssh_cmd使用 new 选项:
my $ssh = Net::OpenSSH->new($host, ssh_cmd => '/usr/local/bin/ssh');

关于perl - 使用Net::OpenSSH和Solaris SSH客户端的“Bad configuration option: ServerAliveInterval”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25309845/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com