문제

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

  • password authentication (only root can access /etc/shadow)
  • binding to a port that is below 1024
  • calling setuid() in order to obtain the privileges of the user that has connected

If 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

다른 팁

Which port did you use? Ports below 1024 are privileged to Root only.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top