I started a new SSH daemon with a config file with a non-standard port number. Now if I start the SSHD as sudo I can SSH onto the host but if i start as a different system account, the daemon starts but the connections fail. Does the SSHD always need to be started as root ?
I made sure the SSHD is running, it just doesnt accept connections.
It is not practical to run sshd
as non-root. sshd
needs root
privileges for
root
can access /etc/shadow
)setuid()
in order to obtain the privileges of the user that has connectedIf you use an unprivileged port and key-based only auth, you may be able to make it work, but you'll be restricted to connections with the user that is running sshd
.
There is a relevant discussion here: http://seclists.org/basics/2003/Aug/564