#!/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";
In reply to Re: Net::SSH Woes
by Khen1950fx
in thread Net::SSH Woes
by btobin0
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |