From c9f0be9ac9555a33ff60d7da5ec89641293a8dcb Mon Sep 17 00:00:00 2001 From: Dan Guido Date: Mon, 15 Sep 2025 10:58:00 -0400 Subject: [PATCH] Fix SSH configuration indentation in cloud-init template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sshd_config file was being written with incorrect indentation due to the indent filter having first=True, which added 6 spaces to the first line of the template. This caused SSH daemon to fail parsing the config file, preventing SSH connections on the configured port (4160). Changed indent(width=6, first=True) to indent(width=6, first=False) to ensure the SSH configuration is written without leading spaces on each line, allowing sshd to properly parse the configuration. Fixes SSH connection timeouts during DigitalOcean deployments. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- files/cloud-init/base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/cloud-init/base.yml b/files/cloud-init/base.yml index 600269079..e91653133 100644 --- a/files/cloud-init/base.yml +++ b/files/cloud-init/base.yml @@ -35,7 +35,7 @@ users: write_files: - path: /etc/ssh/sshd_config content: | -{{ lookup('template', 'files/cloud-init/sshd_config') | indent(width=6, first=True) }} +{{ lookup('template', 'files/cloud-init/sshd_config') | indent(width=6, first=False) }} runcmd: - set -x