ce: Add infrastructure needed to test worker ssh known hosts (#6554)
(cherry picked from commit d022d7daf62623e5cca9c45cd234fd980d5baa9c)
This commit is contained in:
1 parent
cda43e9708
commit
1ba947d731
7 files changed
+174
-15
No files matched your search
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# Copyright IBM Corp. 2020, 2025
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
chown 1000:1000 /etc/ssh/host-key
|
||||
chmod 400 /etc/ssh/host-key
|
||||
|
||||
if ! grep -qE '^HostKey[[:space:]]+/etc/ssh/host-key$' /config/sshd/sshd_config 2>/dev/null; then
|
||||
echo HostKey /etc/ssh/host-key >> /config/sshd/sshd_config
|
||||
fi
|
||||
|
||||
if ! grep -qE '^HostCertificate[[:space:]]+/etc/ssh/host-key-cert.pub$' /config/sshd/sshd_config 2>/dev/null; then
|
||||
echo HostCertificate /etc/ssh/host-key-cert.pub >> /config/sshd/sshd_config
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user