in reply to Re^3: A little demo for Net::SSH2
in thread A little demo for Net::SSH2
Hi,
I want to run program in background in remote host. I tried this but does not work.
Any idea will be appreciated. Thanks.#!/usr/bin/perl -w use strict; use warnings; use Net::SSH2; my $ssh2 = Net::SSH2->new(); $ssh2->connect("myhost.com") or die ("SSH2 Connect Error: $!"); $ssh2->auth_password($user, $pass) or die; my $chan1 = $ssh2->channel(); $chan1->blocking(0); $chan1->exec("./a.out &"); $chan1->close; $ssh2->disconnect();
In Section
Cool Uses for Perl