Can't find sshd process
No - OS X uses OpenSSH and you can inspect the source code used here.
Based on your output, it looks like sshd is not active on the machine. Also ps|grep ssh[d]
will prevent your grep process from matching the target. Some people get concerned when they don't see sshd running, since it gets started on demand when launchd detects an incoming network request. Are you certain ssh is active? You could verify this with lsof|grep ssh
if you have doubts.
Look for this when one ssh has been initiated recently on Lion:
Last login: Mon Jul 16 17:58:26 2012 from 10.0.1.35
mac:~ mike$ ps -ef|grep sshd
0 60320 1 0 4:23PM ?? 0:00.00 /usr/libexec/launchproxy /usr/sbin/sshd -i
0 60321 60320 0 4:23PM ?? 0:00.15 /usr/sbin/sshd -i
501 60330 60321 0 4:23PM ?? 0:00.01 /usr/sbin/sshd -i
501 60336 60331 0 4:23PM ttys003 0:00.00 grep sshd
Is it okay to post to a really old question... I was looking to answer the same today and will attempt to clarify the clarify.
Remote Login enabled in System Preferences Sharing and port 22 is open:
% netstat -p tcp -lna | grep '\*\.22'
tcp4 0 0 *.22 *.* LISTEN
tcp6 0 0 *.22 *.* LISTEN
Then lsof shows launchd is the one listening (found the right options for lsof in the man page and executed as root):
# lsof -iTCP -sTCP:LISTEN | grep ssh
launchd 1 root 50u IPv6 0xc3c700cb936cd50f 0t0 TCP *:ssh (LISTEN)
launchd 1 root 51u IPv4 0xc3c700cb9452be6f 0t0 TCP *:ssh (LISTEN)
launchd 1 root 53u IPv6 0xc3c700cb936cd50f 0t0 TCP *:ssh (LISTEN)
launchd 1 root 58u IPv4 0xc3c700cb9452be6f 0t0 TCP *:ssh (LISTEN)
And when you ssh into the system you see that ssh-agent and sshd are spawned to deal with the connection.
# ps -ef | grep ssh | grep -v grep
501 1231 1 0 12:52PM ?? 0:00.02 /usr/bin/ssh-agent -l
0 1257 1 0 12:53PM ?? 0:00.04 sshd: xxxxx [priv]
501 1259 1257 0 12:53PM ?? 0:00.02 sshd: xxxxx@ttys002