9
1
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?
9
1
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?
23
There are only four potential problem I can think of (most of which have been covered already):
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.
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.
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.
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.
The root access was disabled for me, great answer! – Burgi – 2016-07-11T10:21:38.747
1The 4th option worked for me as well. My /etc/ssh/sshd_config
file did not contain either of the two lines that were mentioned, however I added the PermitRootLogin yes
line to my file anyways and it worked. Make sure you restart your SSH service after making any modifications to that file (service ssh restart
), so that they take effect. – Steph – 2017-09-17T19:52:05.033
0
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.
1What 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 – 2013-01-20T22:51:08.630
As an addition to @DanielBeck's questions: Is root login enabled on the server? What's the
/etc/ssh/sshd_config
look like? – nerdwaller – 2013-01-20T23:05:47.683