#!perl -w use Net::OpenSSH; my $ssh = Net::OpenSSH->new("hostname"); if (my $pid = fork) { # wait for children, do something } elsif ($pid == 0) { exec "another_perl_script", $ssh->get_ctl_path; } __END__ another_perl_script: #!perl -w use Net::OpenSSH; my $ssh = Net::OpenSSH->new($host_or_some_dummy_value, ctl_path => $ARGV[0], reuse_master => 1); $ssh->system("remote command");