SSH on SL won't accept password
apple Verified ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
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
13 replies
Sign in or join Beachball Help to reply.
- 0
V.K. ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
try disabling/re-enabling remote login on this computer. also, check that your firewall is off or if it's on is set to allow ssh connections.
- 0
BobHarris ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
You can try gettng additional diagnostic info using
ssh -v -v -v [email protected]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.
- 0
Pitshin ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I can never ssh to localhost with password authentication on 10.6.2, it's always "Password failed for user". With public/private keys, life is good.
- 0
Topher Kessler ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Try creating a new administrator user account and then logging in with those credentials. After creating the account, be sure to add it to the list of accounts allowed to access the computer via SSH.
- 0
Pitshin ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
This does not change anything. What do you mean by "add it to the list of accounts allowed to access the computer via SSH". There are no Allow/DenyUsers entries in sshd_config.
- 0
Topher Kessler ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
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).
- 0
Pitshin ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I tried 'only for these users' in Account Preferences with 2 admins. Still no dice.
BTW I have often started sshd with the /usr/sbin/sshd command in Terminal since clicking 'Remote Login' may not always launch sshd.
I noticed this "Password failed" problem with macports openssh. I am not the only one.
It used to work for me.
- 0
etresoft ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
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.
- 0
Topher Kessler ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Indeed...I clicked "reply" to him thinking I was responding to the OP.... :/
- 0
edclange ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Is PasswordAuthentication disabled in /etc/sshd_config? It could be that the default setting has changed in Snow Leopard.
I don't have a freshly installed system available to check. All of my Macs followed the upgrade path from Tiger to Leopard to Snow Leopard, without any need to do clean installs or reinstalls in between.
- 0
Kirk ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Man I wish I knew. I've tried everything to obtain the behavior you are having and can't get the server to stop asking for a password (I use the public key method for allowing ssh access).
I've googled my brains out and put 'no' in every field I can find in /etc/ssh_config with no effect. The server insists on asking for passwords.
- 0
KJK555 ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
- 0
BobHarris ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
First, you should try using
ssh -v -v -v [email protected]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