in reply to Net::SSH Woes
#!/usr/bin/perl use strict; use warnings; use Net::SSH::Perl; use Net::SSH::Perl::Cipher; my $host = 'localhost.localdomain'; my $username = 'yourusername'; my $password = 'yourpassword'; my $cmd = 'perl -V'; warn "Starting SSH Services..."; my $ssh = Net::SSH::Perl->new($host, debug => 1); print "Done\n"; warn "Logging in..."; $ssh->login($username, $password); print "Done\n"; warn "Starting command..."; my($stdout, $stderr, $exit) = $ssh->cmd($cmd); print $stdout, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::SSH Woes
by btobin0 (Acolyte) on Feb 26, 2008 at 12:07 UTC | |
by Khen1950fx (Canon) on Feb 27, 2008 at 21:01 UTC | |
|
Re^2: Net::SSH Woes
by btobin0 (Acolyte) on Feb 26, 2008 at 10:04 UTC |