Help for this page

Select Code to Download


  1. or download this
    my $output = $ssh->capture({ timeout => 10 },
                               "echo hello; sleep 20; echo bye");
    $ssh->error and
        warn "operation didn't complete successfully: ". $ssh->error;
    print $output;
    
  2. or download this
        @output = $ssh->capture($CommandE) or die "remote command failed: 
    +" . $ssh->
    +error;
    
  3. or download this
        @output = $ssh->capture($CommandE);
        $ssh->error and 
            die "remote command failed or didn't complete successfully: " 
    +. $ssh->error;