The error "Permission denied (publickey,password)" during SSH connection means the server rejected authentication. Check the password, keys, file permissions, and SSH server settings.
Applies to:
✔ VPS
✔ Dedicated servers
✔ Linux
ssh -v root@SERVER_IP
The output will show at which stage authentication failed.
Make sure you're entering the correct password. Note:
If the password is lost, reset it via VNC/IPMI console:
passwd root
Via VNC/IPMI console, check SSH settings:
grep -E "PasswordAuthentication|PermitRootLogin" /etc/ssh/sshd_config
If PasswordAuthentication no, password login is disabled. To temporarily enable:
sed -i "s/PasswordAuthentication no/PasswordAuthentication yes/" /etc/ssh/sshd_config
systemctl restart sshd
If using a key, make sure the public part is added on the server:
cat ~/.ssh/authorized_keys
Check which key the client is offering:
ssh -v root@SERVER_IP 2>&1 | grep "Offering"
chmod 700 /root/.ssh
chmod 600 /root/.ssh/authorized_keys
chown -R root:root /root/.ssh
grep -E "AllowUsers|AllowGroups|DenyUsers" /etc/ssh/sshd_config
If AllowUsers is specified and root is not listed, add it:
AllowUsers root yourusername
systemctl restart sshd
grep PermitRootLogin /etc/ssh/sshd_config
If the value is no, change to yes or prohibit-password:
sed -i "s/PermitRootLogin no/PermitRootLogin yes/" /etc/ssh/sshd_config
systemctl restart sshd
ssh root@SERVER_IP
If the connection still fails after all checks, open a support ticket. Include:
- output of ssh -v root@IP
- contents of /etc/ssh/sshd_config (if accessible via VNC/IPMI)