in reply to Re^2: cpan module to do stuff remotely
in thread cpan module to do stuff remotely
Net::SSH, or the OO Net::SSH::Perl is easy to use:
#!/usr/bin/perl -wT use Net::SSH::Perl; use feature qw( say ); my $ssh = Net::SSH::Perl->new( "1.2.3.4" ); $ssh = Net::SSH::Perl->new( "my.host.name" ); #You can use a hostname $ssh->login( "zaphod", "twoheads2" ); my($stdout, $stderr, $exit) = $ssh->cmd( "cat /dev/universe" ); say "The command said: $stdout"; say "The command error'd: $stderr"; say "The command's exit status was $exit";
You can always do it yourself if you really must, with IO::Socket, or even Socket if you dare.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: cpan module to do stuff remotely
by Steve_BZ (Chaplain) on Jun 06, 2012 at 01:05 UTC | |
by thomas895 (Deacon) on Jun 06, 2012 at 06:57 UTC | |
by Anonymous Monk on Jun 06, 2012 at 07:18 UTC |