Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Ubuntu 10.04.1 , SSH server is running fine, but I wonder, why there are two sshd instead of one? Isn't one multithreades daemon enough? Is this an option?

share|improve this question
up vote 6 down vote accepted

Doesn't top show userland threads by default? One is likely a thread of the other.

If you look in htop (a more interactive top) you can sort by tree and find out. You can also disable showing threads in its options screen (F2, Display Options and check Hide userland threads)

share|improve this answer
You are sooo right! Yes, one is a thread of the other. Thanks! – Hristo Hristov Oct 23 '10 at 12:03
And thanks for the htop note, so sweet. – Hristo Hristov Oct 23 '10 at 12:05

The OpenSSH server forks for every incoming connection, so it's normal to see multiple sshd processes, especially when you are logged in on the server, or when the computer is connected to the internet with a public IP address (scriptkiddies trying all the time).

From the manual:

 sshd listens for connections from clients.  It is normally started at boot from /etc/rc.  It forks a new daemon for
 each incoming connection.  The forked daemons handle key exchange, encryption, authentication, command execution,
 and data exchange.

If nobody is logged in, or trying to log in, there should be only one sshd process.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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