I know this problem has been discussed several times in the forum but none of the steps recommended to remedy the problem have worked in my case.
In the following I will describe again the problem and then explain the (unsuccessful) measures I have taken so far to remedy the error.
I tried to check the functionality of my ssh server by connecting to it via the following command. After typing in the correct password, I am presented with this message:
$ ssh root@localhost
root@localhost's password:
"Permission denied, please try again."
To remedy the problem I made the following change to the sshd_config
file:
I set:
PermitRootLogin yes
Then I restarted the SSH Server again by giving the command:
sudo service ssh restart
However, when trying to connect to the server I got the same response as before:
Permission denied, please try again.
I checked /etc/shadow
and saw that there is an exclamation mark in front of the root user password (i.e. the password is locked).
To unlock it I gave the command:
$ sudo usermod -U root
unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password."
Hence, I gave the following command :
sudo usermod -p root
But the exclamation mark in front of the root password is still there and I still can't connect to the SSH server ... Is there anybody who knows what the solution to this problem is?
sudo passwd
? – muru Jan 27 '15 at 17:02sudo
is your account's password, not the root accounts. When you didsudo passwd
, you set root's password. – muru Jan 27 '15 at 17:13AllowUsers root@192.168.1.*
in /etc/sshd_config so you can only connect to root from local network. Or you can assign an exact ip to allow from – geoffmcc Jan 28 '15 at 00:55