Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A while back here How can I enable internet sharing without using the gui or apple script on snow leopard? I asked if any one knows how to enable Internet sharing without using GUI or apple script, I still have that problem but I thought this one should be easier, I want to be able to SSH into my machine but sure enough I can't go to the "sharing" pane in the Preferences (It crashes). How can I start sshd?

share|improve this question
I think that the issue to look into solving is why the Sharing preference pane is crashing. Does the system.log tell you anything useful? – kmm Apr 28 '11 at 21:53
up vote 10 down vote accepted

You can enable SSH from the Terminal with:

sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist

(note that you need to run this as an admin, and it'll ask for your admin password, which won't echo as you type.)

share|improve this answer

Here's the command to start VNC sharing -- not SSH, but perhaps it will help you (be sure to replace the password with your own!):

sudo /System/Library/CoreServices/RemoteManagement/ -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw PutYourOwnPasswordHere -restart -agent -privs -all

Then you should be able to log in using a VNC client with the password you specified.

Here's the command to stop sharing:

sudo /System/Library/CoreServices/RemoteManagement/ -deactivate -configure -access -off

Note that the Sharing pane will NOT show that sharing is active when you turn it on this way via the command line!


share|improve this answer
Wow! @Austin that works, thank you, do you happen to know tho answer to my original question too?… – Ali Apr 30 '11 at 3:50
I took a crack at it. Hope it helps! – Austin May 2 '11 at 6:48
sudo systemsetup -setremotelogin on
sudo systemsetup -setremotelogin off
share|improve this answer
Thanks. Also is there a way to add remove users who can ssh. You know in the UI you can choose who can use the "remote login". – Ali Oct 30 '14 at 10:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.