From 153749aebed692d27058186466549292fd7d9a1b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 19 Mar 2021 15:13:37 -0400 Subject: [PATCH] Change ssh duringe suse 15 post Have port 22 be inside the target environment, and 2222 point to the installer. This improves ansible experience. --- .../suse15/profiles/hpc/scripts/prechroot.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/prechroot.sh b/confluent_osdeploy/suse15/profiles/hpc/scripts/prechroot.sh index 54a92781..264fc7bd 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/prechroot.sh +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/prechroot.sh @@ -19,3 +19,10 @@ cp -a /tls/* /mnt/var/lib/ca-certificates/pem cp -a /tls/*.pem /mnt/etc/pki/trust/anchors run_remote setupssh.sh + +echo Port 22 >> /etc/ssh/sshd_config +echo Port 2222 >> /etc/ssh/sshd_config +echo Match LocalPort 22 >> /etc/ssh/sshd_config +echo " ChrootDirectory /mnt" >> /etc/ssh/sshd_config +kill -HUP $(cat /run/sshd.pid) +