Can't connect to my Oracle Virtual Cloud Instance

Viewed 1410

the Terminal just says:

ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection timed out

Here are the firewall rules.

I can't ssh into the VM so I cant change the firewall rules on the VM

Please Help.

2 Answers

First, double-check your IP address: it must match your Oracle Virtual Cloud Public IP Address, assuming it is a reserved one (meaning it is a fixed one)

Second, check your local firewall: you cannot change the remote ones, but the local rules might still block your SSH traffic.

As mentioned here:

ust by opening the port through firewall and security lists will not allow new incoming connections. Ex: unless there is a service listening on port 443 (Tomcat etc), you will be unable to connect. Same with SSH daemon for port 22.

So make sure the SSH daemon is up and running.

Check also Default Security List

Unlike other security lists, the default security list comes with an initial set of stateful rules, which should in most cases be changed to only allow inbound traffic from authorized subnets relevant to the region that homes that VCN or subnet.

A list of authorized subnet ranges relevant to each region can be found here .

In particular:

Stateful ingress: Allow TCP traffic on destination port 22 (SSH) from authorized source IP addresses and any source port.

This rule makes it easy for you to create a new cloud network and public subnet, launch a Linux instance, and then immediately use SSH to connect to that instance without needing to write any security list rules yourself.

Related