diff options
Diffstat (limited to 'roles/cloud/install')
-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 #} |