Getting SSH to work on Snow Leopard (OSX 10.6.x)

Im a recent mac indoctrinite (love my Windows 7 and linux but this is best of both worlds) and wanted to share with you guys the way to get ssh "listening" on your Snow Leopard System (as it seems there are some Mac Zealot crack babies out there that cant write simple clear cut directions)..

Hope this helps someone

1. Open Terminal
2. vi /etc/sshd_config (use whatever editor makes you happy. vi is fastest)
3. I have the following uncommented on my machine:

Port 2233 # (means ssh will listen on port 2233 instead of 22 default)
AddressFamily any
ListenAddress 0.0.0.0

(feel free to adjust as needed)

4. Also make sure the following are UNCOMMENTED:

PermitRootLogin yes #(only if not in production though)
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication yes
X11Forwarding yes

5. Now vi /System/Library/LaunchDaemons/ssh.plist (or use whatever editor you like)

6. Change <key>Disabled</key> to Enabled

7. Change <string> (under Label) to local.sshd

8. Go down to the line that says SockServiceName .. now the next like (that says string) change to "ssh-batman" (or whatever you want that is unique.. i like batman)

9. Ok save and exit file..

10. Now vi /etc/services and add the following lines to the bottom:
ssh-batman 2233/udp # batmans SSH listening port
ssh-batman 2233/tcp # batmans SSH listening port

11. Save and exit file.

12. Finally start and stop the launchDaemons service which controls connections to SSHD (this is the mac osx equiv to inetd/xinetd in linux land)

launchctl unload /System/Library/LaunchDaemons/ssh.plist (ignore any errors)
launchctl load /System/Library/LaunchDaemons/ssh.plist

13. Now if you type "netstat -na | grep LIST" you should see something like the following:

tcp4 0 0 *.2233 . LISTEN
tcp6 0 0 *.2233 . LISTEN


VOILA!! Magnifique no?? now if you use:
ssh -p 2233 127.0.0.1

SSH WORKS AS IT SHOULD AND THE WORLD IS GOLD AND GOOD!

Cheers everyone.. hope this helps!

-TGF

Macbook, Mac OS X (10.6.4)

Posted on Nov 1, 2010 5:30 PM

Reply
3 replies

Nov 2, 2010 11:14 AM in response to etresoft

Are you F *ing kidding me??? You are the first person to even mention these steps! I googled for an hour and half to put together the instructions I posted

(Thank you!!)

When i looked at your steps, it seems that the manual process I put together seems to activate it (as it seems its checked).

This is what im talking about thou.. Instead of being able to find people like you who are clear and to the point, i find a bunch of J** offs who couldnt write out what should have been a simple process and I had to struggle..

I definately hope this post circulates. Snow Leopard is a KILLER operating system even for experienced sys admins. I think we will see a lot of Windows - SL migrations in the next year here.

Cheers mate.. Thanks again!
-fond

Nov 2, 2010 11:46 AM in response to TheGreatFrondini

TheGreatFrondini wrote:
When i looked at your steps, it seems that the manual process I put together seems to activate it (as it seems its checked).


Those steps are more or less accurate if you wanted to run sshd on a non-standard port.

This is what im talking about thou.. Instead of being able to find people like you who are clear and to the point, i find a bunch of J** offs who couldnt write out what should have been a simple process and I had to struggle..


For some time now the internet has ceased to be a source of valid information. It is there, but you have to be able to sort through the more common misinformation. Someone puts up a blog post in 2006 and it causes no end of frustration when people can't get it to work today. For example, step #6 above is not quite accurate. To set or unset the disabled flag, use the '-w" parameter on launchctl instead.

I definately hope this post circulates. Snow Leopard is a KILLER operating system even for experienced sys admins. I think we will see a lot of Windows - SL migrations in the next year here.


I'm glad you like it. There are an awful lot of people who are switching to the Mac and don't seem too happy about it. It is good to be one of those who can embrace the change 🙂

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Getting SSH to work on Snow Leopard (OSX 10.6.x)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.