sshd -t to test configuration file syntax?

Markus Friedl Markus.Friedl at informatik.uni-erlangen.de
Thu Feb 22 02:27:31 EST 2001


sounds useful.

all you need is exit(0);
after the

        /* Check certain values for sanity. */
        if (options.protocol & SSH_PROTO_1) {
                if (options.server_key_bits < 512 ||
                    options.server_key_bits > 32768) {
                        fprintf(stderr, "Bad server key size.\n");
                        exit(1);
		...
	}

in sshd.c
 

On Wed, Feb 21, 2001 at 05:21:08PM +0200, Pekka Savola wrote:
> Hello all,
> 
> sshd configuration file options change from one release to another.
> 
> If you forget updating sshd_config, sshd will not start.
> 
> This is especially painful for update scripts etc. where you can't do e.g.
> 'sshd -p 2022' to see if it's okay.
> 
> May I suggest some option, e.g. sshd -t, which would test config files and
> other obvious issues and return an errorcode if something is broken?
> 
> Does this seem useful?
> 
> -- 
> Pekka Savola                  "Tell me of difficulties surmounted,
> Netcore Oy                    not those you stumble over and fall"
> Systems. Networks. Security.   -- Robert Jordan: A Crown of Swords
> 
> 





More information about the openssh-unix-dev mailing list