2

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

3 Answers 3

8

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.

3
  • 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
    Commented Dec 8, 2011 at 7:56
  • 1
    Funny how not having a password actually makes your SSH more secure.
    – bmike
    Commented Dec 8, 2011 at 19:05
  • 1
    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
    Commented Dec 10, 2011 at 5:33
3

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.

3

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .