6

There is a system user named sshd on my system, and a group named ssh:

$ cat /etc/passwd | grep ssh
sshd:x:120:65534::/var/run/sshd:/usr/sbin/nologin
$ cat /etc/group | grep ssh
ssh:x:117:

My guess is the user sshd allows OpenSSH to use port 22, and access /etc/ssh without having to run as root.

I'm assuming the ssh group was also created by OpenSSH, but I can't find any mention of it in the documentation.

What is the purpose of this new user?

6

Only the root user is capable of creating sockets in privileged ports eg port < 1024.

The ssh user/group is used with privilege separation in openSSH.

The daemon is running a process with user root, and when receiving connections, running in a chroot environment with the non-privileged user sshd.

Or put other way, it runs the part of the operations that needs privileges as root, and the part they can isolate as a non-privileged user.

I will leave a link here of the project, which also has a link to a paper about the subject.

http://www.citi.umich.edu/u/provos/ssh/privsep.html

The paper:

http://www.citi.umich.edu/u/provos/papers/privsep.pdf

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.