5

What am I missing? I change the root password on a unix machine, then try to log in with that password. PasswordAuthentication is set to yes in sshd_config and the sshd daemon has been restarted. This behavior happens whether I log in remotely or locally:

root@ip-10-0-0-155:~# passwd
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
root@ip-10-0-0-155:~# ssh root@127.0.0.1
root@127.0.0.1's password: 
Permission denied, please try again.
root@127.0.0.1's password:

migrated from stackoverflow.com Aug 18 '12 at 11:02

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

  • 2
    Some systems do not allow root login have to verified that? – Rohan Aug 18 '12 at 6:41
  • make sure of your ip's which you have changed the password and trying to re-login are the same ip's. – THANGA Aug 18 '12 at 6:44
  • 1
    Check root login permission: grep -i permitroot /etc/sshd_config. – Vidul Aug 18 '12 at 6:49
  • This is not necessarily a good idea... – Alex Chamberlain Aug 18 '12 at 18:11
  • Perhaps someone can clarify this: I found that a password that contained a @ always failed (for three different clean installs) but an identical password that used a ! instead worked OK – ElectricLlama Nov 8 '17 at 0:03
13

Check this file: /etc/ssh/sshd_config and search for the line:

PermitRootLogin no

replace it by:

PermitRootLogin yes
  • Tough if you can't log in as root - having the same problem – Bysander Jul 1 '15 at 8:52
  • 1
    This is the solution, but security wise, there are probably some better options.. – Ring Ø Oct 1 '15 at 15:45
0

I had the same problem and I solved it.

My keyboards were not configured in the same manner between an ssh console and the server's keyboard. The key + on my numpad was, in fact, the =; but I never find out why.

Check if you enter the same characteres.

0

You are logging in to localhost with ssh. This is usually not necessary and may carry some overhead. Try

su -

in a terminal and enter the password.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy