7.10. Checking Configuration Syntax

Is there a syntax-checker for sshd_config?

But of course. After making your changes, run this command:

	# sshd -t

If there are no syntax errors, it exits silently. If it find mistakes, it tells you:

	# sshd -t
	/etc/ssh/sshd_config: line 9: Bad configuration option: Porotocol
	/etc/ssh/sshd_config: terminating, 1 bad configuration options

You can do this while the SSH daemon is running, so you can correct your mistakes before issuing a reload or restart command.

The -t stands for "test." It does not affect the SSH daemon, it only checks /etc/sshd_config for syntax errors, so you can use it anytime.