Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sshd running twice?

Status
Not open for further replies.

ngxGraz

Technical User
Jun 22, 2007
56
CA
Hey guys, I was just making a few changes to an sshd config, when i noticed that.. there's two running? I'm not sure if it's normal, but either way it's preventing the stop command from working properly.

Code:
[root@warrior ~]# ps -ef|grep ssh
root     15591     1  0 10:37 ?        00:00:00 sshd: root@pts/1 
root     15655     1  0 10:38 ?        00:00:00 /usr/sbin/sshd
root     15664 15593  0 10:39 pts/1    00:00:00 grep ssh
[root@warrior ~]# /etc/init.d/sshd stop
Stopping sshd:[  OK  ]
[root@warrior ~]# ps -ef|grep ssh
root     15591     1  0 10:37 ?        00:00:00 sshd: root@pts/1 
root     15673 15593  0 10:39 pts/1    00:00:00 grep ssh
so it looks like two sshds are running, and stop will only stop one.
Note that if i try to stop again, it says failed, and also note i did this remotely, so because i didn't get kicked out, i must have killed t he one that wasn't listening.
ALSO note, I know i can just kill the process, but obviously running restart would be easier... but it doesn't restart the right one. Is this normal?

I'm running Enterprise Redhat, thanks.
 
I hope this helps too.
Code:
[root@warrior ~]# /etc/init.d/sshd status
sshd (pid 15591) is running...
[root@warrior ~]# /etc/init.d/sshd start
Starting sshd:[  OK  ]
[root@warrior ~]# ps -ef|grep ssh
root     15591     1  0 10:37 ?        00:00:00 sshd: root@pts/1 
root     15722     1  0 10:45 ?        00:00:00 /usr/sbin/sshd
root     15726 15593  0 10:45 pts/1    00:00:00 grep ssh
[root@warrior ~]# /etc/init.d/sshd status
sshd (pid 15722 15591) is running...
[root@warrior ~]# /etc/init.d/sshd stop
Stopping sshd:[  OK  ]
[root@warrior ~]# /etc/init.d/sshd status
sshd (pid 15591) is running...
[root@warrior ~]# /etc/init.d/sshd stop
Stopping sshd:[FAILED]
[root@warrior ~]# /etc/init.d/sshd status
sshd (pid 15591) is running...
[root@warrior ~]# /etc/init.d/sshd start
Starting sshd:[  OK  ]
[root@warrior ~]# ps -ef|grep ssh
root     15591     1  0 10:37 ?        00:00:00 sshd: root@pts/1 
root     15763     1  0 10:45 ?        00:00:00 /usr/sbin/sshd
root     15768 15593  0 10:45 pts/1    00:00:00 grep ssh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top