Prerequisites
Before troubleshooting, ensure you have:
- Your server IP address
- SSH client (terminal, PuTTY)
- Valid username and password or SSH key
Common Causes
The "Permission denied" error typically means:
- Incorrect username or password
- Wrong SSH key permissions
- User not allowed to SSH into the server
- Root login disabled
Fix 1: Verify Credentials
Double-check your username and password. The default root user for Hostxpeed is:
ssh hxroot@YOUR_SERVER_IP -p 22Then enter your root password exactly as provided.
Fix 2: Check SSH Key Permissions
If using SSH keys, ensure correct permissions on your local machine:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/authorized_keysFix 3: Verify User Exists on Server
As root, check if the user account exists:
cat /etc/passwd | grep usernameIf not found, create the user:
adduser usernameFix 4: Check SSH Configuration
On the server, verify SSH settings:
sudo nano /etc/ssh/sshd_configEnsure these lines exist:
PasswordAuthentication yes
ChallengeResponseAuthentication yes
PermitRootLogin yesRestart SSH after changes:
sudo systemctl restart sshd⚠️ Note: Disabling password authentication or root login improves security but can cause this error if misconfigured.
Fix 5: Check Account Lockout
The user account might be locked:
sudo passwd -S usernameIf locked (shows "L"), unlock with:
sudo passwd -u usernameFix 6: Check /etc/ssh/sshd_config for DenyUsers
Look for lines that might block specific users:
grep -i "denyusers" /etc/ssh/sshd_configIf present, remove or comment them out.
Quick Diagnostic Commands
On the server (via console access), check SSH logs:
sudo tail -f /var/log/auth.log | grep sshdFor CentOS/RHEL:
sudo journalctl -u sshd -f