Help for this page

Select Code to Download


  1. or download this
    my $cmd1 = "cat /etc/passwd";
    my $sshcmd = "/usr/bin/ssh -t -i \$HOME/.ssh/mypubkey -o 'StrictHostKe
    +yChecking no' user\@host $cmd1";
    open(IFILE, "$sshcmd |") || die "Bad open";
    
  2. or download this
    my @cmd = (cat => (
        '/etc/passwd',
    ...
    
    open(my $fr_ssh, '-|', @sshcmd)
        or die("Can't fork and pipe: $!\n");