Can't connect as root from another server with SSH?


I’m trying to setup SSH keys from between my servers, to manage rsync server backups to my backup server. I was trying to get it going with ssh-copy-id, but it keeps moaning about the password being wrong. So I’m not just trying it with normal SSH:

ssh -p 22122 "[email protected]"
[email protected]'s password:
Permission denied, please try again.
[email protected]'s password:

It connects (so can’t be a firewall issue), but ends up rejecting the password (even though its correct)

In /etc/ssh/sshd_config I have:

Port 22122
#AddressFamily any
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 1m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

What am I missing?

Thanks in advance


did you already check this

PasswordAuthentication yes

dont forget to restart the ssh

perhaps help

Thanks for the reply. Yup, I did that. I also made sure SSH it wasn’t set to just allow from the local IP.

In the end, I set up SSH keys on the destination and end server, and now it lets me run the commands I want without a password anyway :slight_smile: (which was the end game anyway, so I could resync from server to server without revealing passwords :))