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

If I create an account, and don't give it a password, what's the password to SSH it?

share|improve this question
up vote 7 down vote accepted

Having no password on the OS level effectively means that ssh is disabled for that user. The protocol insists on a non-zero password and thus the hashes of whatever password is supplied fails to match the absence of a hash.

You must supply ssh keys or otherwise arrange some authentication to log in should your account have no password.

share|improve this answer
This is correct. I deleted the password for my account and was unable to ssh into it, even though ssh was enabled for all users. – TJ Luoma Dec 8 '11 at 7:56
Funny how not having a password actually makes your SSH more secure. – bmike Dec 8 '11 at 19:05
Yeah, and if you lock your keys in your car, you'll never get into a car accident. :-) (Well, at least not in that car.) SSH is not enabled by default, and can be enabled/disabled on a per-account basis too. However, if you do enable it, I'd suggest changing the default port to keep the script kiddies away. – TJ Luoma Dec 10 '11 at 5:33

Interesting question. I don't know the answer, but if OS X behaves like other UNIXes (and I suspect it does), it is possible to for a userid to exist without a password. In that case, the login is disabled and incoming ssh connections will prompt for a password but nothing will satisfy the requirement to authenticate.

share|improve this answer

You could put your public key into the authorized_keys of the account you were trying to ssh into and you wouldn't be prompted for a password anymore.

share|improve this answer

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.