aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKnut Auvor Grythe <knut@auvor.no>2015-03-31 16:38:01 +0200
committerKnut Auvor Grythe <knut@auvor.no>2015-03-31 16:38:01 +0200
commitbae936a701bd791518bf7acff2d10eb8fb6bab54 (patch)
tree34518f60687acb75d66a9c814336b01b4807e0eb
parent69747efcf8aca1a3c1241eb126bf0d0e27b8af05 (diff)
now featuring reduced security on ssh
-rwxr-xr-xclients/smanagrun.pl7
-rwxr-xr-xinclude/nms.pm3
2 files changed, 8 insertions, 2 deletions
diff --git a/clients/smanagrun.pl b/clients/smanagrun.pl
index a68edf8..30a702d 100755
--- a/clients/smanagrun.pl
+++ b/clients/smanagrun.pl
@@ -127,6 +127,11 @@ while (1) {
waitpid($ssh->{pid}, 0);
$sunlock->execute($switch->{sysname});
};
- warn $@ if $@;
+ if ($@) {
+ warn $@;
+ $sdelay->execute($@ . ", delaying...", $switch->{sysname});
+ $sunlock->execute($switch->{sysname});
+ $dbh->commit();
+ }
}
diff --git a/include/nms.pm b/include/nms.pm
index 589f7f0..e532a05 100755
--- a/include/nms.pm
+++ b/include/nms.pm
@@ -47,7 +47,8 @@ sub switch_connect_ssh($) {
my ($ip) = @_;
my $ssh = Net::OpenSSH->new($ip,
user => $nms::config::tacacs_user,
- password => $nms::config::tacacs_pass);
+ password => $nms::config::tacacs_pass,
+ master_opts => [ "-o", "StrictHostKeyChecking=no" ]);
my ($pty, $pid) = $ssh->open2pty({stderr_to_stdout => 1})
or die "unable to start remote shell: " . $ssh->error;