package Net::SSH;
use strict;
-use vars qw($VERSION @ISA @EXPORT_OK $ssh);
+use vars qw($VERSION @ISA @EXPORT_OK $ssh $DEBUG);
use Exporter;
use IPC::Open2;
use IPC::Open3;
@EXPORT_OK = qw( ssh issh sshopen2 sshopen3 );
$VERSION = '0.02';
+$DEBUG = 0;
+
$ssh = "ssh";
=head1 NAME
sub ssh {
my($host, @command) = @_;
my @cmd = ($ssh, '-o', 'BatchMode yes', $host, @command);
+ warn "[Net::SSH::ssh] executing ". join(' ', @cmd). "\n"
+ if $DEBUG;
system(@cmd);
}