SSH Connection Refused on Oracle Cloud Free Tier while Installing n8n

Oracle Cloud SSH Connection Refused – Stuck While Installing n8n

Hi all, I’m working on a personal automation project using Oracle Cloud (Free Tier) to self-host n8n, but I’m currently stuck at the SSH connection stage.


Current Setup

  • Oracle Cloud Free Tier
  • VM instances created:
    • Ubuntu: Canonical-Ubuntu-XX
    • Oracle Linux: Oracle-Linux-9.0-2025.0721-01 (tried later)
  • Public IP assigned and visible
  • Trying to SSH using a .pem key

The Problem

  • Getting Connection refused when attempting to SSH
  • Security List: Ingress rule for 0.0.0.0/0, TCP port 22 is open
  • Internet Gateway + Route Table: confirmed and configured
  • Key permissions: set via chmod 400
  • SSH command used:
ssh -i my-key.pem ubuntu@ IP

Hey @Motorboy_Shin hope all is good. Welcome to the community.

There could be a number of reasons for connection refused error, let’s go over a few possible scenarios.

  • Can you connect to the VM from elsewhere with the same key?
  • Verify that SSH is actually running on that VM (systemctl)
  • Verify that SSH is listening on port 22 (netstat or ss)
  • Verify TCP connection with nc -vz <PUBLIC_IP> 22
  • Verify that the VM doesn’t impose its own firewall rules (ip_tables or ufw)
  • Verify that the traffic is reaching the VM (tcpdump or ssh debug)
  • Verify:
    • public subnet + public ip
    • security List or NSG rules
    • you are using the correct public ip :slight_smile: (you’d be surprised)
    • user is allowed to ssh into system
    • sshd configuration allows key based access

Quite a few things that can go wrong, as you can see.

I was running an n8n instance on Oracle Cloud, but after the latest update, the VM crashed and became inaccessible. I tried deploying a new VM, and while it works fine for other applications, the system becomes unreachable as soon as n8n is installed and the VM is rebooted.

This behavior suggests that either:

  1. Oracle Cloud may be blocking n8n after installation, or

  2. The latest n8n version has a bug causing the VM to fail after reboot.

For reference, I previously had a successful installation following this video guide: https://youtu.be/5MGjRTqCmtI

Need to Troubleshoot further to confirm whether the issue lies with Oracle’s restrictions or with n8n itself. OR If reproducible, consider raising a major issue with the n8n team.

Update :

Update :

Finally, it worked after installing the latest Docker and Docker Compose, without using an Nginx reverse proxy.

Used these for installation :

https://docs.docker.com/compose/install/linux/

https://docs.docker.com/engine/install/ubuntu/

I don’t think this is related to Oracle Cloud restrictions with n8n, I personally run n8n on Oracle Cloud using Coolify for management and previously EasyPanel, and before that installed directly on the server, and I haven’t faced any issues with that.

That said, aside from n8n, Oracle Cloud is well-known for randomly shutting down some free-tier accounts, especially the always-free ones rather than the “pay as you go” plans..

So the core issue here might simply be that the account/server itself got suspended.

Update :

Finally, it worked after installing the latest Docker and Docker Compose, without using an Nginx reverse proxy.

Used these for installation :

https://docs.docker.com/compose/install/linux/

https://docs.docker.com/engine/install/ubuntu/

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.