Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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.