Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I try to log in with PuTTY as root, but when I type in the password it says access denied.

Can someone please help me fix this?

share|improve this question
    
What have you tried? Did you verify you're connecting to the correct host? Is e password correct, or did you e.g. Change keyboard layouts? Can you log in using other users? Is SSH root login enabled or disabled? –  Daniel Beck Jan 20 '13 at 22:51
    
As an addition to @DanielBeck's questions: Is root login enabled on the server? What's the /etc/ssh/sshd_config look like? –  nerdwaller Jan 20 '13 at 23:05

2 Answers 2

There are only four potential problem I can think of (most of which have been covered already):

  • You're not connecting to the right server.

    • If you're using an IP address, check it.

    • If you're using a host name, verify that it's pointing to the right IP address and/or try the IP address instead.

  • You're not entering the right username.

    • The fact that you have root access doesn't mean you can actually log in as root. It only means that you have an account with root privileges (normally via sudo).

    • If you're not entering the username manually, make sure Connection → Data → Auto-login username is actually set to root.

  • You're not entering the right password.

    • Check the password you're entering.

    • Verify that CapsLock is disabled.

    • Verify that PuTTY uses the proper keyboard layout.

    • If you use AltGr, make sure Terminal → Keyboard → AltGr acts as Comopse key isn't checked.

    • If none of the above works, clear the field Connection → Data → Auto-login username (assuming it is set) and enter the password in the username field to verify it gets entered correctly.

  • Root access is disabled.

    Some SSH servers can disable SSH logins for certain users and may even disable root logins by default.

    If you're using Open SSH server, you have to edit /etc/ssh/sshd_config and make sure that it doesn't contain one of the following lines:

    PermitRootLogin no
    PermitRootLogin without-password
    

    Both result in a simple Access denied. error, although they permit you to enter the password. The latter only allows root logins when authenticating using public keys.

    To permit root logins, remove the corresponding line or replace it with the following:

    PermitRootLogin yes
    

    See man sshd_config for further information.

share|improve this answer

For me it was fail2ban that I had installed.

Solution: edit /etc/fail2ban/jail.local

The line with the entry ignoreip = must be edited. Put your IP / CIDR / DNS name in the box and the login should be possible again.

share|improve this answer

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.