From 060d8093e63133502b2bc86accba4669dba2ad1e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 11 Aug 2020 16:51:42 -0400 Subject: [PATCH] Fix sshd_config generation --- .../genesis/initramfs/opt/confluent/bin/rungenesis | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis index 72d2197a..f12a9672 100644 --- a/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis +++ b/confluent_osdeploy/genesis/initramfs/opt/confluent/bin/rungenesis @@ -6,9 +6,6 @@ udevadm trigger udevadm trigger --type=devices --action=add udevadm settle cat > /etc/ssh/sshd_config << EOF -HostKey /etc/ssh/ssh_host_rsa_key -HostKey /etc/ssh/ssh_host_ecdsa_key -HostKey /etc/ssh/ssh_host_ed25519_key PermitRootLogin yes AuthorizedKeysFile .ssh/authorized_keys EOF @@ -71,10 +68,13 @@ else ip route add default via $v4gw fi fi +wait for pubkey in /etc/ssh/ssh_host*key.pub; do certfile=${pubkey/.pub/-cert.pub} + privfile=${pubkey%.pub} /usr/libexec/platform-python /opt/confluent/bin/apiclient /confluent-api/self/sshcert $pubkey > $certfile echo HostCertificate $certfile >> /etc/ssh/sshd_config + echo HostKey $privfile >> /etc/ssh/sshd_config done killall sshd /usr/sbin/sshd