perl - Net::OpenSSH::Gateway->find_gateway fails when ControlPersist option is set -
i trying create persistent gateway connection using net::openssh::gateway. below code snippet using same.
my %proxy_opts = ( host => $host, port=>$port, password=>$password, user=>$user , scheme=>"ssh", ssh_cmd => '/usr/bin/ssh', master_opts => [ -o=>"stricthostkeychecking=no", -o=>"tcpkeepalive=no", -o=>"serveraliveinterval=30", -o=>"serveralivecountmax=90", -o=>"controlpath=/tmp/ssh-master-%h_%p_%r", -o=>"controlpersist=yes" ] ); %gateway_settings = ( proxies=>[ {%proxy_opts} ]); $gateway = net::openssh::gateway->find_gateway(%gateway_settings, errors=>$errors);
i error below. if remove option controlpath , controlpersist entire thing works fine.
[error ] unable establish master ssh connection: bad ssh master @ /root/.libnet-openssh-perl/spangeni-j1.zscaler.-31930-744378, socket owned pid 31933 (pid 31931 expected)
i think it's bug in module. module net::openssh::gateway
doesn't exist on cpan, , author said that:
i have not published on cpan yet because, functional, have found problems internal architecture want solve first. -source
and if see documentation of net::openssh
you'll see gateway experimental feature.
btw version of openssh
using? controlpersist requires openssh 5.6 or newer.
Comments
Post a Comment