Skip to content

Commit

Permalink
Wait if the ssh authentication didnt work
Browse files Browse the repository at this point in the history
  • Loading branch information
foursixnine committed Feb 13, 2019
1 parent e764de3 commit 27eb30a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/baseclass.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,6 @@ sub new_ssh_connection {
my $counter = 5;
while ($counter > 0) {
if ($ssh->connect($args{hostname})) {

if ($args{password}) {
$ssh->auth(username => $args{username}, password => $args{password});
}
Expand All @@ -1183,7 +1182,7 @@ sub new_ssh_connection {
$ssh->auth_agent($args{username});
}
bmwqemu::diag "Connection to $args{username}\@$args{hostname} established" if $ssh->auth_ok;
last;
sleep(10);
}
else {
bmwqemu::diag "Could not connect to $args{username}\@$args{hostname}, Retry";
Expand Down

0 comments on commit 27eb30a

Please sign in to comment.