diff options
author | Christian Pointner <equinox@spreadspace.org> | 2024-02-25 01:28:18 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2024-02-25 01:28:18 +0100 |
commit | 4e3053749991a09fbdf17ad93ee6654f4fbbf7a7 (patch) | |
tree | c1511e7a0a6db02510e51295b70e3c44063e1bc4 /roles/cloud/install/templates | |
parent | apt-repo/backports: fix for bookworm; ch-installsmb increase samba share for ... (diff) |
installer/* improve regexp to set ssh port and fix ssh port config for newer ubuntu releases
Diffstat (limited to 'roles/cloud/install/templates')
-rw-r--r-- | roles/cloud/install/templates/hetzner_postinst.sh.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/cloud/install/templates/hetzner_postinst.sh.j2 b/roles/cloud/install/templates/hetzner_postinst.sh.j2 index 329469be..d79ee957 100644 --- a/roles/cloud/install/templates/hetzner_postinst.sh.j2 +++ b/roles/cloud/install/templates/hetzner_postinst.sh.j2 @@ -36,7 +36,7 @@ cat <<EOK > /root/.ssh/authorized_keys {{ ssh_keys_root | join('\n') }} EOK {% if ansible_port is defined %} -sed -e 's/^\(\s*#*\s*Port.*\)/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config +sed -e 's/^\s*#*\s*Port\s\s*[0-9][0-9]*$/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config {% endif %} {# this is actually only needed on ubuntu bionic and beyond but should not hurt on other installations either #} |