From 68b5d3df3c3ed62f0ddbfaf59eabab54ea6938d2 Mon Sep 17 00:00:00 2001 From: "Josh.5" Date: Wed, 26 Jan 2022 15:44:48 +1300 Subject: [PATCH] /etc/ssh/ssh_config does not always import from /etc/ssh/ssh_config.d on all distributions --- overlay/etc/cont-init.d/20-configre_sshd.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/overlay/etc/cont-init.d/20-configre_sshd.sh b/overlay/etc/cont-init.d/20-configre_sshd.sh index 41704f2..3ed0f19 100644 --- a/overlay/etc/cont-init.d/20-configre_sshd.sh +++ b/overlay/etc/cont-init.d/20-configre_sshd.sh @@ -8,6 +8,8 @@ mkdir -p /run/sshd chmod 744 /run/sshd echo "**** Configure SSH service ****"; -echo 'Port 2222' > /etc/ssh/ssh_config.d/port.conf + +sed -i 's|^# Port 22.*$|Port 2222|' /etc/ssh/ssh_config +#echo 'Port 2222' > /etc/ssh/ssh_config.d/port.conf echo "DONE"