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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't find ssh process

Status
Not open for further replies.

keak

Programmer
Joined
Sep 12, 2005
Messages
247
Location
CA
HI there,
Is there a way i can locate the current ssh process running? Specifically, i need to find the program.

I did ps aux | grep ssh but then i only get the followin:
root 30348 0.0 0.0 1820 568 pts/2 R+ 11:35 0:00 grep ssh


I am trying to locate where I can restart my ssh and where I can config it.

I think its running ssh2
but when id do
/usr/local/sbin/sshd2 restart
it gives me ....
# /usr/local/sbin/sshd2
: OpenSSH_3.8.1p1 on i686-pc-linux-gnu
: FATAL: Creating listener failed: port 22 probably already in use!
# /usr/local/sbin/sshd2 restart
sshd2: FATAL: Extra arguments in command line


and I am kind of lost now ....


any input is much appreciated.

 
Well if you run updatedb then do a "locate sshd" it may show you if another sshd is running (ps -ef|grep sshd)

Also #service sshd restart may restart it?

Just a couple of guesses
 
thanks foir the input probablydown,


i did and i still find the same things.
Is there a way to track back the executable file that was used to invoke the current ssh running.

px -ef | grep sshd didn't return anything ....

I get this after running updatedb:
/etc/init.d/sshd
/etc/ssh2/sshd2_config
/etc/ssh2/sshd2_config~
/etc/ssh/sshd_config
/etc/ssh/sshd_config~
/usr/lib/win32/vsshdsd.dll
/usr/local/sbin/sshd
/usr/local/sbin/sshd2
/usr/local/sbin/sshd-check-conf
/usr/local/share/man/man5/sshd2_config.5
/usr/local/share/man/man5/sshd-check-conf.5
/usr/local/share/man/man8/sshd2.8
/usr/local/share/man/man8/sshd.8
/usr/sbin/sshd
/usr/share/man/man5/sshd_config.5.gz
/usr/share/man/man8/sshd.8.gz
/var/run/sshd
/var/run/sshd2_22.pid


 
Code:
# lsof -i tcp:22
will give you the process listening to port 22.
 
Also, once you've resolved that, this is the file you're looking for:

[tt]/etc/init.d/sshd[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top