Using PuTTY on my Windows laptop, I am able to ssh
into my Mac desktop, but once I've logged in, I can't find any sshd
process running on the Mac. E.g. running the following right after ssh-ing into the Mac:
% ps -eo pid,command | grep sshd | grep -v grep
…produces no output. Of course, needless to say, I get the same results (no output) if I use ps -ef
instead of ps -eo pid,command
.
Also, there's no /var/run/sshd.pid
file.
What's going on? Does OS X use a different program to handle incoming ssh logins?
Best Answer
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 withlsof|grep ssh
if you have doubts.Look for this when one ssh has been initiated recently on Lion: