summaryrefslogtreecommitdiff
path: root/SSH.pm
diff options
context:
space:
mode:
Diffstat (limited to 'SSH.pm')
-rw-r--r--SSH.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/SSH.pm b/SSH.pm
index b56a17f..2c50547 100644
--- a/SSH.pm
+++ b/SSH.pm
@@ -1,7 +1,7 @@
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;
@@ -10,6 +10,8 @@ use IPC::Open3;
@EXPORT_OK = qw( ssh issh sshopen2 sshopen3 );
$VERSION = '0.02';
+$DEBUG = 0;
+
$ssh = "ssh";
=head1 NAME
@@ -45,6 +47,8 @@ Calls ssh in batch mode.
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);
}