---
title: Troubleshooting SSH connection issues on Elastic Metal servers
description: Solutions for resolving SSH connection problems on Scaleway Elastic Metal servers.
tags: elastic-metal troubleshooting SSH
dates:
  validation: 2025-08-11
  posted: 2025-02-05
---

## Problem
You are unable to connect to your Scaleway Elastic Metal server via SSH.

### Symptoms
- 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 causes
- 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.
- You recently changed your SSH keys, and they have not been added to the Elastic Metal server.

## Solution

#### 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` or `ufw status`.
- If necessary, temporarily disable the firewall using `systemctl stop firewalld` or `ufw 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](/elastic-metal/how-to/use-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`.

#### Add the new SSH key to the existent system
- Reboot in rescue mode as explained in this [documentation](/elastic-metal/how-to/use-rescue-mode/)
- Mount filesystem in rescue mode to access data and files by following these [steps](/elastic-metal/troubleshooting/troubleshoot-rescue-your-data/#mounting-partitions)
- Modify the "authorized_keys" file to add your new SSH public key at the end
