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();
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: A little demo for Net::SSH2
by zentara (Archbishop) on Oct 30, 2010 at 10:33 UTC | |
Re^5: A little demo for Net::SSH2
by afoken (Chancellor) on Oct 30, 2010 at 11:37 UTC | |
by Anonymous Monk on Nov 01, 2010 at 14:35 UTC | |
by zentara (Archbishop) on Nov 15, 2010 at 18:20 UTC |
In Section
Cool Uses for Perl