App-RemoteCommand

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.990  2023-05-08 00:02:09 JST
  - Require perl v5.16

0.982  2018-09-01 18:36:29 JST
  - Add -F (ssh configfile) option

0.981  2018-03-24 23:22:35 JST
  - When canceling, send signal to process group of master connection

0.98  2018-03-24 08:58:35 JST
  - Set timeout => 6 together with ConnectTimeout=5;
    This prevents from leaving proxy ssh processes.

0.97  2018-02-09 08:45:02 JST
  - Refactor (#4)
  - Minimum perl version 5.8.5 -> 5.8.4

0.96  2017-09-19 19:28:45 JST
  - Fix how to handle failures in connecting

0.95  2017-09-13 22:47:21 JST

lib/App/RemoteCommand/SSH.pm  view on Meta::CPAN

sub _ssh {
    my ($self, %args) = @_;
    my $loglevel = DEBUG ? "error" : "quiet";
    Net::OpenSSH->new($args{host},
        async => 1,
        strict_mode => 0,
        timeout => 6,
        kill_ssh_on_timeout => 1,
        master_setpgrp => 1,
        master_opts => [
            -o => "ConnectTimeout=5",
            -o => "StrictHostKeyChecking=no",
            -o => "UserKnownHostsFile=/dev/null",
            -o => "LogLevel=$loglevel",
            ($args{configfile} ? (-F => $args{configfile}) : ()),
        ],
    );
}

use constant STATE_TODO          => 1;
use constant STATE_CONNECTING    => 2;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.538 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )