Hello, @jinkangkang, thanks for reaching out and reporting this.
This is the expected behavior for sshd.
If your configuration is not correct, the command will state it as it should.
If your configuration is correct, no config errors are shown, as sshd is able to parse the config file. Then, after that, it says the privilege separation directory is not there, not exactly because you are not running the daemon, but because you are running sshd as root. The root user (or kerberos authenticated user) need the dir to be present to be able to run sshd - you can check that, running as root, this error happens even without the -t flag.
If your configuration is correct and you run sshd -t as a non-root user, it should work without complaining about the directory.
I am closing this bug as invalid, but please feel free to reopen and add context if you think something in this flow is wrong.
Hello, @jinkangkang, thanks for reaching out and reporting this.
This is the expected behavior for sshd.
If your configuration is not correct, the command will state it as it should.
If your configuration is correct, no config errors are shown, as sshd is able to parse the config file. Then, after that, it says the privilege separation directory is not there, not exactly because you are not running the daemon, but because you are running sshd as root. The root user (or kerberos authenticated user) need the dir to be present to be able to run sshd - you can check that, running as root, this error happens even without the -t flag.
If your configuration is correct and you run sshd -t as a non-root user, it should work without complaining about the directory.
I am closing this bug as invalid, but please feel free to reopen and add context if you think something in this flow is wrong.