diff options
author | Knut Auvor Grythe <knut@auvor.no> | 2015-03-31 16:38:01 +0200 |
---|---|---|
committer | Knut Auvor Grythe <knut@auvor.no> | 2015-03-31 16:38:01 +0200 |
commit | bae936a701bd791518bf7acff2d10eb8fb6bab54 (patch) | |
tree | 34518f60687acb75d66a9c814336b01b4807e0eb | |
parent | 69747efcf8aca1a3c1241eb126bf0d0e27b8af05 (diff) |
now featuring reduced security on ssh
-rwxr-xr-x | clients/smanagrun.pl | 7 | ||||
-rwxr-xr-x | include/nms.pm | 3 |
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; |