Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

share|improve this question
add comment

3 Answers 3

up vote 8 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
1  
Funny how not having a password actually makes your SSH more secure. –  bmike Dec 8 '11 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 Dec 10 '11 at 5:33
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.