#!/usr/bin/perl use Net::SSH2; # logon and object setup code omitted for clarity my $chan = $ssh2->channel(); $chan->blocking(1); $chan->exec("nohup /home/zentara/perlplay/net/zzsleep > foo.out 2> foo.err < /dev/null &"); $chan->send_eof; exit;