Ssh – What does ‘?’ represent under TTY

processpssshtty

If you run ps in your terminal, you may see something like the following:

enter image description here

What is ?? I'm ssh'ing into a Linux server, so I assume that it's just the sshd as it says under CMD, but I'm curious what the ? is considering there is pts/1 to represent my terminal instance.

Best Answer

It shows ? since there is no TTY (terminal interface) to which this process is attached. This is fortunate since sshd is a system daemon and should not be dependent on a client session.

As mentioned in the comments, closing a session will terminate all related processes for that TTY, which is not desired for system wide processes.

Related Question