Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I recently set up a new CentOS 5 server, which has OpenSSH installed by default.

When I connect with PuTTY, the SSH server tells me "access denied" before prompting me for a password. Once I provide the password I log in to my shell fine. It never used to work seemingly out of order like that before, and there's nothing strange in the security log when I log in, just a successful login.

login as: admin
Access denied
admin@gold's password:
Last login: Sun Jul 17 00:26:50 2011 from pool-xxx-xx-xxx-xx.phlapa.fios.verizon.net

I made one change in the default config to change PermitRootLogin to no.

I also upgraded PuTTY to the latest version on the same day as setting up the server, though that's probably unrelated.

share|improve this question
    
look at/post the output of ssh -v your-server and tail -f /var/log/secure –  Lmwangi Jul 17 '11 at 5:29
add comment

4 Answers

up vote 6 down vote accepted

Uncheck "Attempt GSSAPI authentication (SSH-2 only)" under SSH -> Auth -> GSSAPI.

share|improve this answer
    
Bingo. This was exactly my issue. Is this just a CentOS build that prints that message? Or is it something else? –  Jonathon Reinhart Aug 14 '12 at 7:13
    
It seems that problem is in GSSAPIAuthentication option set to yes in /etc/ssh/sshd_config in RedHat-like distributives (CentOS, Scientific Linux, etc.). –  hangover Aug 14 '12 at 11:55
    
Yep, just noticed that difference to my Debian box. Good call! –  Jonathon Reinhart Aug 14 '12 at 15:53
add comment

Is it possible that it's trying some other authentication method, such as public-key, before falling back to password? I'm wondering if maybe your permissions on ~/.ssh/ (and the usual files inside there) are wrong on either the client or the server end. Maybe it's saying "access denied" because it wasn't allowed to read your id_rsa.pub on the server side, or your id_rsa on the client side.

share|improve this answer
add comment

In putty UNCHECK Attempt Auth Using Pageant in your connection.

share|improve this answer
add comment

I bet on a PAM module. Which modules are in the ssh auth chain?

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.