Fresh Trellis install fails on "Create a secure sshd_config"

Hello,

I’ve updated to roots/tap/trellis-cli 1.12.1 and created a fresh trellis install.

Versions installed are:
Trellis v1.22.1
Bedrock v1.24.5

and limactl version is 0.23.2

Before I updated trellis the VM’s came up fine. However, now I consistently get the following error. This happens when running trellis vm start

TASK [sshd : Create a secure sshd_config] **************************************
fatal: [default]: FAILED! => {"changed": false, "checksum": "e66f6a82ad7c5be40452ed352fadbf9e563b6c5f", "exit_status": 255, "msg": "failed to validate", "stderr": "Missing privilege separation directory: /run/sshd\r\n", "stderr_lines": ["Missing privilege separation directory: /run/sshd"], "stdout": "", "stdout_lines": []}

Any ideas? I am on a Mac.

Best,
Aaron

I uninstalled and installed trellis again and same issue.

In addition, I see these warnings and errors.

<project-folder> is the path to the project directory

<project-folder>/trellis/lib/trellis/plugins/vars/version.py), cannot
load: No module named 'distutils'
<project-folder>/trellis/lib/trellis/plugins/callback/vars.py:50: SyntaxWarning: invalid escape sequence '\.'
  patterns = [re.sub(r'\*', '(.)*', re.sub(r'\.', '\.', var)) for var in raw_vars if var.split('.')[0] in hostvars]
<project-folder>/trellis/lib/trellis/plugins/callback/vars.py:51: SyntaxWarning: invalid escape sequence '\.'
  keys = set(pattern.split('\.')[0] for pattern in patterns)

I also tried to downgrade trellis-cli to v1.11.1 to see if this resolved the issue but was not successful.

Looks like your VM is trying to use Ubuntu 24.04 without some of the recent updates from Trellis, including this one specifically for the sshd_config

Try this until a new version of Trellis is tagged:

trellis new --trellis-version dev ./example.com

Hi @ben,

Thanks, that solved the sssh_d config problem. It now is running.

I do still receive the regex errors though from vars.py. These don’t seem to break things though.

Best,
Aaron

1 Like

:thinking: With trellis-cli v1.12.1 and the latest version of Trellis (just tagged v1.23.0, so the --trellis-version dev noted above is no longer necessary) I’m not able to see those warnings/errors when using Lima

Steps followed:

  1. trellis new ./example.com
  2. cd example.com/trellis/
  3. trellis vm start

What command(s) were ran when you saw those errors?