Skip to content

Commit

Permalink
fix: tests: Ubuntu 24.04 adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
speed47 committed Jul 2, 2024
1 parent 603425b commit 77ab1e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/functional/tests.d/900-strict-checking.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ testsuite_strict_checking()
retvalshouldbe 255
contain "Permanently added"

# change the remote hostkeys
success change_host_keys $r0 "\"find /etc/ssh/ -type f -name 'ssh_host_*' -delete; ssh-keygen -A\""
# change the remote hostkeys, also send HUP to force sshd to take the change into account (Ubuntu 24+ at least),
# don't check return value as we'll kill our own session with pkill, as a collateral damage.
# uname -s: under FreeBSD, this interrupts the tests otherwise.
run change_host_keys $r0 "\"find /etc/ssh/ -type f -name 'ssh_host_*' -delete; ssh-keygen -A; test \$(uname -s) = Linux && pkill -HUP sshd\""

# set bastion ssh_client config to StrictHostKeyChecking yes
sshclientconfigchg 's=StrictHostKeyChecking.*=StrictHostKeyChecking\\\\x20yes=g'
Expand Down

0 comments on commit 77ab1e2

Please sign in to comment.