#!/usr/bin/perl -w use Net::SSH::Perl; use Net::SSH::Expect; my $remoteCmd = `ssh myserverid.company.com -l myuid -i /home/myuid/.ssh/authorized_keys top`; #### #!/usr/bin/perl -w use IO::Handle; my $handle = IO::Handle->new; my $pid = open($handle, 'command & |') or die $!; print $pid;