Troubleshoot connection to cloud instances
If you cannot connect to your cloud instance via SSH, the issue is usually related to a common configuration problem.
You can use the troubleshooting steps below to identify and resolve the issue. We recommend starting with the quick checks first.
-
Quick checks
Before troubleshooting further, confirm the following:
- The instance status is Active
- The instance power state is Running
- The security group allows SSH (port 22) inbound traffic
- The correct instance username is used
- The correct private key is used
If these checks are correct and you still cannot connect, continue with the steps below.
-
Common error messages
The table below lists common SSH error messages, the likely cause, and what you should check.
Follow the troubleshooting sections below to resolve these issues.
Error Message Likely cause
Suggested Action Connection timed out SSH traffic blocked Check security group rules Connection refused SSH service is not reachable or instance not running Check instance status and IP Connection closed by [instance] port 22 Authentication failed or SSH service closed the connection Check instance username and private key Host key verification failed The host key stored locally does not match the instance Remove entry from known_hosts Network is unreachable Incorrect IP address or network issue Check the instance IP address No supported authentication methods available SSH authentication failed Check instance username and private key Permission denied (publickey) Incorrect key or username Check username and private key Permission too open Private key permissions are too permissive Check private key permissions Please log in as the user “X” rather than the user “Y”. Incorrect username used for the operating system Check instance username Private key must begin with… Private key is not in valid PEM format Check private key format Unable to load key Private key format or file path is incorrect Check private key format
Unprotected private key file Private key permissions are too permissive Check private key permissions
User key not recognised by server Incorrect private key used Check private key
Server refused our key SSH key authentication failed Check private key and username
-
Check security group rules
Security groups control which network traffic is allowed to reach your instance.
To connect via SSH, the instance must allow inbound traffic on port 22.
The default security group already includes a rule allowing SSH access.
If your instance is using a custom security group, ensure it includes a rule allowing:
- Protocol: TCP
- Port: 22
- Direction: Ingress
If the rule restricts traffic to a specific IP address or range, ensure your current IP address is allowed.
-
Check the SSH command
Ensure the SSH command used to connect is correct:
ssh -i /path/privatekey.pem username@ip-addressExample:
ssh -i ~/.ssh/mykey.pem ubuntu@154.65.100.23The file path in the command must be correct.Â
- This should be the fully-qualified path to the location on your computer.
- The file type (default .pem) must be included.
You should also check:
- The username matches the instance operating system.
- The IP address matches the instance
Note: SSH uses port 22 by default, so specifying -p22 is not usually required.
-
Check the instance username
A connection error can occur if the incorrect username is used.
When connecting for the first time, you must log in using the default username for the instance image.
These are the default usernames for the xneelo Cloud public images.
OS Name Default username AlmaLinux almalinux CentOS cloud-user Debian debian Ubuntu ubuntu If you are using a different operating system image, the default username may differ.
-
Check the private key
The private key used to connect must match the key pair assigned to the instance when it was created.
Common problems include:
- Selecting the wrong private key file
- Using a key from another instance
- The key file being corrupted or incomplete
Ensure the correct private key file is used in your SSH command.
-
Check the private key format
SSH keys used with xneelo Cloud are typically stored in .pem format.
The file should begin with a line similar to:
-----BEGIN RSA PRIVATE KEY-----If the key does not follow this format, it may not work with SSH.
If you are connecting using PuTTY on Windows, the private key must be converted to .ppk format using PuTTYgen.
-
Check private key permissions
SSH requires private keys to have restricted permissions to ensure only the current user can read the key file.
If permissions are too open, SSH will reject the key.
Follow the steps to set permissions on the private key file.
-
Check the instance IP address
Verify that the IP address used in your SSH command matches the instance public IP address.
You can find the IP address in: Compute > Instances.
Both IPv4 and IPv6 addresses may be available.
If you are using IPv6 and cannot connect, try the IPv4 address instead. Some Internet Service Providers (ISPs) do not support IPv6 connectivity.
-
Host key verification failed
This can occur if the instance was rebuilt or its SSH host key changed.
SSH stores known hosts in the following file:
~/.ssh/known_hostsYou can remove the entry for the instance from this file and attempt to connect again.
The error message you received should display the line number corresponding to the host instance (IP address will be displayed). You will need to remove this line from the known-hosts text file.
You can either remove this from the file manually, or via command line. In this example, the offending line is line 76.
sed -i '76d' ~/.ssh/known_hosts
-
Check the instance status or reboot
Your instance must be running before it can accept SSH connections.Steps
-
1Navigate to Compute → Instances.
-
2Locate your instance in the table.
-
3Confirm:
- Status: Active
- Power State: Running
If the instance is stopped or paused, start or reboot the instance.
-
-
Check the instance console log
If the instance is running but still unreachable, check the console log.
The console log displays system messages generated during instance startup.
These logs may reveal issues such as:
- network configuration errors
- missing network interfaces
- cloud-init failures
- disk or filesystem errors
Review the console output for error messages that may explain why the instance cannot accept connections.
By default, the last 35 lines of the console’s output will be displayed. However, you may need to view the full log to find the error.
-
Consider recent changes
If an instance was previously accessible but is now unreachable, consider recent changes that may have caused the issue.Examples include:
- Changing security group rules
- Introducing firewall rules
- Modifying network configuration
- Performing system upgrades
- Editing configuration files that affect boot or networking
Reverting recent changes may restore connectivity.
-
Lost private key
If you have lost the private key used to access your instance, SSH access will not be possible.You will need to replace the key pair or recover access using the instance console.
See how to recover instance access after losing the private key.
If you still cannot connect after following the troubleshooting steps above, contact support and include:
- The error message you received
- The SSH command you used
- The instance IP address
Please note that xneelo Cloud is a self-managed product, and support may not be able to assist with operating system configuration issues inside the instance.
You can read more about our support in xneelo Cloud.





