Symptoms
The SSH service fails to start on a VOS node. The following errors are observed:
sudo systemctl start sshreturns: Job for ssh.service failed because the control process exited with error code.systemctl status ssh.serviceshowsActive: failed (Result: exit-code)- The
ExecStartPrestep (/usr/sbin/sshd -t) exits with status=255, meaning sshd failed its pre-flight config check before it could even start. - VSH restart and node reboot do not resolve the issue.
Root Cause
The sshd -t pre-flight check (run automatically by systemd before starting sshd) failed with exit code 255. This indicates a problem in the SSH daemon configuration — typically one of:
- A syntax error or invalid directive in
/etc/ssh/sshd_config - An accidental character (e.g. a stray
#, extra space, or typo) introduced into the config - A missing or corrupt host key file
- A host key file with incorrect permissions
Diagnostic Steps
Run the sshd config test directly to get the exact error:
sudo sshd -tThis will print the exact line and reason for the failure. Note it down.
Check the systemd journal for additional context:
sudo journalctl -xe -u ssh.service | tail -30Compare
/etc/ssh/sshd_configwith a known-good node at the same site or a similar healthy site. Look for:- Stray or misplaced
#characters that comment out required directives - Typos in directive names or values
- Any recently added or modified lines
- Stray or misplaced
cat /etc/ssh/sshd_configVerify host key files exist and have correct permissions (must be
600, owned byroot):ls -la /etc/ssh/ssh_host_*Expected output example:
-rw------- 1 root root 227 Jan 1 00:00 /etc/ssh/ssh_host_ecdsa_key -rw-r--r-- 1 root root 162 Jan 1 00:00 /etc/ssh/ssh_host_ecdsa_key.pub -rw------- 1 root root 399 Jan 1 00:00 /etc/ssh/ssh_host_ed25519_key -rw-r--r-- 1 root root 82 Jan 1 00:00 /etc/ssh/ssh_host_ed25519_key.pub -rw------- 1 root root 1675 Jan 1 00:00 /etc/ssh/ssh_host_rsa_key -rw-r--r-- 1 root root 382 Jan 1 00:00 /etc/ssh/ssh_host_rsa_key.pubIf any private key has permissions other than
600, fix with:sudo chmod 600 /etc/ssh/ssh_host_*_keyCheck for drop-in config files that may override or conflict:
ls /etc/ssh/sshd_config.d/
Resolution
Fix the issue identified in the
sudo sshd -toutput — most commonly a config syntax error. If a line was accidentally modified, restore it from a known-good node's/etc/ssh/sshd_config.Re-run the config test to confirm it passes cleanly (no output = success):
sudo sshd -tStart the SSH service:
sudo systemctl start ssh systemctl status ssh.serviceConfirm SSH is listening:
ss -tlnp | grep sshd
Notes
- This issue does not affect traffic forwarding or VOS data-plane functions, only SSH management access to the node is impacted.
- If the config file on the affected node looks identical to a healthy node and
sshd -tstill fails, collect the fulljournalctloutput and open a case with Versa Support.