SSH on SL won't accept password

Hello -- I upgraded recently straight from Tiger to Snow Leopard.

I used to be able to SSH into this computer remotely, but now when I try it tells me my password is invalid...tried several times, and I know I'm using the right one (caps lock, etc). I confirmed the SSHD is running and that in Sharing my user has authorization to log in remotely (all users are authorized).

Is this expected? Any workarounds?

Chris

iMac, Mac OS X (10.6.2)

Posted on Jan 31, 2010 9:28 AM

Reply
13 replies

Jan 31, 2010 7:52 PM in response to Christopher Prew

You can try gettng additional diagnostic info using

ssh -v -v -v username@remote.mac.address

Is it possible that your $HOME/.ssh/known_hosts file has an old entry for the upgraded Mac. The error message would tell you which line of the known_hosts file it is complaining about, or just trash the entire known_hosts file and repopulate it as you connect to each ssh host.

Another reason for rejecting a password, is if the remote Mac's home directory or $HOME/.ssh directory, or several other critical ssh files have the wrong permissions. ssh will not trust such as system. NOTE: this could be the remote or the local files that have the wrong permissions. See the "man ssh" man page and search for "permission" to find the files and permissions that ssh requires.

Mar 4, 2010 9:27 AM in response to Pitshin

Go to the "Sharing" system preferences and under "Remote Login" there should be a list where you can specify accounts that can access the computer using this service. I mentioned creating a new account to see if the problem was with a current account's configuration, or if the problem is deeper and applies to all accounts, regardless of when or how they were created.

Adding accounts to this list, instead using the default "All users" option, may be yet another way to have the system reconfigure SSH so it hopefully will work again (similar to VK's suggestion for turning it off and on).

Mar 4, 2010 10:22 AM in response to Pitshin

You seem to be hijacking someone else's thread with an unrelated problem. Please start your own with your specific problem.

BTW I have often started sshd with the /usr/sbin/sshd command in Terminal since clicking 'Remote Login' may not always launch sshd.


Really? Don't do that. That indicates you have serious issues with your system.

I noticed this "Password failed" problem with macports openssh. I am not the only one.


Macports is 3rd party software. You should ask them for support. Why would you ever use ssh from Macports instead of ssh in MacOS X. It seems like you are just making problems for yourself.

Mar 29, 2010 6:38 PM in response to Kirk

First, you should try using

ssh -v -v -v username@destination.system.address

If you have another system that is working correctly, then do the same *ssh -v -v -v* command to that as well. Now compare the debugging output.

Second, check all your file permissions. If ssh sees that any of the key files allow too much access to anyone except the owner, it will NOT trust the connection.

You should look at "man ssh" and search for "permission" then make sure that every file and directory mentioned have the correct permissions.

I've seen situations where the home directory allowed write access to others besides owner, the .ssh directory cannot allow access for anyone besides owner. There is also the authorized_keys file (only owner gets write access), the id rsa/iddsa private files need to be kept private (only owner gets access).

The "man ssh" will list all the files you need to worry about.

Finally, it is possible that you have over configured the /etc/ssh_config, so I hope you have the original version of /etc/ssh_config so you can return to the defaults.

Message was edited by: BobHarris

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.

SSH on SL won't accept password

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