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'm trying to connect SSH using Putty to my server but somehow I cannot connect and it comes with Access Denied error when I type in my username.

Is there something I need to do to fix this issue?

share|improve this question

migrated from stackoverflow.com Oct 2 '11 at 23:17

This question came from our site for professional and enthusiast programmers.

    
you can add more details ? –  JuanPablo Oct 2 '11 at 23:16
1  
In putty, in host field try : username@ip_server –  JuanPablo Oct 2 '11 at 23:18
    
Does your server have SSH installed? you have the right port (22)? –  Book Of Zeus Oct 2 '11 at 23:19
    
Is the port open on the server? Can your client send data to the server's port? (Try telnet servername 22 or netcat servername 22 and look for SSH-2.0-... banner message.) Try the 'real' ssh client program, run it with the ssh -v servername -v command line option to dump debugging messages, you might find why putty can't connect that way. –  sarnold Oct 2 '11 at 23:26
1  
Rilindo you are absolutely right!!! –  user952543 Oct 3 '11 at 2:01

2 Answers 2

up vote 0 down vote accepted

Putty has GSSAPI enabled by default.

Putty GSSAPI Configuration

Turn it off if you are not using Kerberos (and chances are, you are not in your environment).

Explanation:

I dealt with a few weeks back with when a new administrator could not login to any ssh host with putty - even the one that I know should be working for him. It seems that with GSSAPI Auth enabled, Putty will attempt to login with non-existent kerberos credentials, which resulted in an immediate Access Denied message:

enter image description here

By way of comparison, here is me trying to login to a host that has the DenyUsers directive enabled (and without GSSAPI Auth enabled):

enter image description here

share|improve this answer
    
Its worth noting, though, that after additional testing that even though you may get Access Denied immediately, you can still get logged in as it appears to fall back to password credentials. So either a)The OP was being thrown off by the message and guinuely though that he couldn't login or b) his putty client is not falling back to user/pass auth. –  Rilindo Oct 3 '11 at 2:28

Chances are this problem isn't PuTTY specific and you'll encounter it with any SSH client. You either don't have permission to log in via SSH or you have the wrong username/password combo.

You should ensure that your user account is listed in the AllowUsers field in sshd.conf. Additionally if you are trying to log in directly as root you should make sure that PermitRootLogin is set to yes. You should note that allowing root login is bad. Very bad.

share|improve this answer
    
I'm using port 22. I'm sure I'm using correct username/password it's just coming up with Access Denied immediately after when you type in username and hit enter. Can this be a firewall issue? –  user952543 Oct 2 '11 at 23:44
    
Did you verify the settings that I mentioned? This sounds a lot like you're not listed in the AllowedUsers directive that I mentioned. It would probably be helpful for you to post your entire sshd.conf –  MDMarra Oct 2 '11 at 23:57
    
If it were firewall-related you wouldn't get the chance to enter your account info. –  Keith Stokes Oct 3 '11 at 0:46
    
I imported the private key but it's coming up with unable to use key file error. Where do you find sshd.conf? I'm using Windows and server is UNIX –  user952543 Oct 3 '11 at 0:48
    
It's on the server-side. If you don't control the server, you shouldn't be posting here. –  MDMarra Oct 3 '11 at 1:02

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.