Troubleshooting SSH connection issues on Elastic Metal servers
Reviewed on 05 February 2025 • Published on 05 February 2025
ProblemLink to this anchor
You are unable to connect to your Scaleway Elastic Metal server via SSH.
SymptomsLink to this anchor
- SSH connection times out or is refused.
- You receive an authentication failure when entering credentials.
- You see a “Permission denied” error when using an SSH key.
- SSH hangs indefinitely without a response.
- The server is unreachable via its public IP.
Possible causesLink to this anchor
- The SSH service is not running or is misconfigured.
- The server is not accessible due to firewall or network restrictions.
- Incorrect SSH credentials or key configuration.
- The server is in rescue mode and requires a different login method.
- A recent security policy change has disabled SSH access.
SolutionLink to this anchor
Check network connectivity
- Try pinging the server:
ping <server-ip>
. - Use
traceroute <server-ip>
to diagnose potential routing issues. - If using a Private Network, verify that you are connecting from the correct subnet.
Check SSH key and credentials
- Ensure you are using the correct SSH key associated with your Scaleway account.
- Run SSH with verbose mode (
ssh -v root@<server-ip>
) to diagnose authentication errors. - If logging in with a password, check that password authentication is enabled in
/etc/ssh/sshd_config
.
Check firewall and security settings
- List firewall rules using
iptables -L -v -n
orufw status
. - If necessary, temporarily disable the firewall using
systemctl stop firewalld
orufw disable
. - Ensure SSH is allowed on port 22 (or your custom SSH port if changed).
Ensure the server is in normal mode
- If the server is in rescue mode, reboot it into normal mode.
- Rescue mode may require different credentials (visible in your Scaleway console) to log in.
Verify the SSH service status
- Use the remote console from the Scaleway dashboard to access your server.
- Run
systemctl status ssh
to check if the SSH service is running. - If the service is stopped, restart it using
systemctl restart ssh
.
Was this page helpful?