I'm using the default installation of openssh-server
for my Ubuntu 14.04 server. I can connect through the console as root like normal, with my username and password. When I try to SSH with the same username/password, however, I repeatedly get Access Denied errors. /var/log/auth.log
reports Failed password for root from <ip address> port <port> ssh2
, but I'm entering the correct password.
Why can't I connect to the server via SSH, even though the username and password ARE correct?
Best Answer
The default setting in Debian (and hence Ubuntu) for OpenSSH Server is to deny password-based login for root and allow only key-based login. Change this line in
/etc/ssh/sshd_config
:to
And restart the SSH server: