After updating SCALE, ssh service no longer starts

After updating to version 25.04.1 I noticed the ssh service wasn’t on so I tried using the GUI to start it but the error below was displayed.

I found this #post-537478.

But manually editing files on the system seems like the wrong move, plus I don’t know that it will actually help.

Any suggestions would be appreciated.

Error:

...
Shell server... Jun 13 14:41:05 sshd[3906363]: /etc/ssh/sshd_config line 37: Directive 'StrictModes' is not allowed within a Match block Jun 13 14:41:05 systemd[1]: ssh.service: Control process exited, code=exited, status=255/EXCEPTION Jun 13 14:41:05 systemd[1]: ssh.service: Failed with result 'exit-code'. Jun 13 14:41:05 systemd[1]: Failed to start ssh.service - OpenBSD Secure Shell server. Jun 13 14:41:05 systemd[1]: ssh.service: Scheduled restart job, restart counter is at 3. Jun 13 14:41:05 systemd[1]: Stopped ssh.service - OpenBSD Secure Shell server. Jun 13 14:41:06 systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... Jun 13 14:41:06 sshd[3906364]: /etc/ssh/sshd_config line 37: Directive 'StrictModes' is not allowed within a Match block Jun 13 14:41:06 systemd[1]: ssh.service: Control process exited, code=exited, status=255/EXCEPTION Jun 13 14:41:06 systemd[1]: ssh.service: Failed with result 'exit-code'. Jun 13 14:41:06 systemd[1]: Failed to start ssh.service - OpenBSD Secure Shell server. Jun 13 14:41:06 systemd[1]: ssh.service: Scheduled restart job, restart counter is at 4. Jun 13 14:41:06 systemd[1]: Stopped ssh.service - OpenBSD Secure Shell server. Jun 13 14:41:06 systemd[1]: Starting ssh.service - OpenBSD Secure Shell server... Jun 13 14:41:06 sshd[3906365]: /etc/ssh/sshd_config line 37: Directive 'StrictModes' is not allowed within a Match block Jun 13 14:41:06 systemd[1]: ssh.service: Control process exited, code=exited, status=255/EXCEPTION Jun 13 14:41:06 systemd[1]: ssh.service: Failed with result 'exit-code'. Jun 13 14:41:06 systemd[1]: Failed to start ssh.service - OpenBSD Secure Shell server. Jun 13 14:41:06 systemd[1]: ssh.service: Scheduled restart job, restart counter is at 5. Jun 13 14:41:06 systemd[1]: Stopped ssh.service - OpenBSD Secure Shell server. Jun 13 14:41:06 systemd[1]: ssh.service: Start request repeated too quickly. Jun 13 14:41:06 systemd[1]: ssh.service: Failed with result 'exit-code'. Jun 13 14:41:06 systemd[1]: Failed to start ssh.service - OpenBSD Secure Shell server. Jun 13 15:15:59 systemd[1]: ssh.service: Control process exited, code=exited, status=255/EXCEPTION Jun 13 15:15:59 sshd[13841]: /etc/ssh/sshd_config line 28: Directive 'StrictModes' is not allowed within a Match block Jun 13 15:15:59 systemd[1]: ssh.service: Failed with result 'exit-code'. Jun 13 15:15:59 systemd[1]: Failed to start ssh.service - OpenBSD Secure Shell server.

Remove (or comment out) the auxiliary parameters you’ve set up, and the service should start. Then work to figure out how (if at all) to implement them under 25.04.

When you say auxiliary parameters, are you talking about the autotune variables in Sysctl? Otherwise, I’m unaware of any.

Presumably, in the TrueNAS GUI:
System → Services → SSH (Edit) → Advanced Settings → Auxiliary Parameters

1 Like

As Neo says, I meant the service parameters for SSH. I had the same issue myself.

2 Likes

Exellent! Thank you for the clarification! I saw it right where you said it would be.
What I found:
StrictModes yes

After removing it restarted just fine.

I’m not sure that I ever placed that config in there. Is it really a good idea to not enable StrictModes?

It’s enabled by default for OpenSSH, so there’s no need to specify that explicitly.

3 Likes