πŸšͺChange ssh port

Compared to other Clouds, OCI requires some extra steps to avoid getting locked out.

1. Edit Security List on OCI

From the OCI control panel navigate to Compute > Instances and select your instance. You should see something like this:

Click on the subnet:

Next, either make a new Security List, or simply edit the Default:

Add a new Ingress Rule:

In the following panel enter the required information:

  • Source Type: CIDR

  • Source CIDR: either 0.0.0.0/0 or <the-ip-you'll-be-connecting-from>/32

  • IP Protocol: TCP

  • Destination Port Range: <the-port-you-want-to-use-for-ssh>

  • Description: something that makes sense to you

2. Change SSH listening port in the daemon

Next, connect to your instance as you did here and change SSH port on the VM:

More details about this process can be found here.

3. Manage ingress rules with firewalld

Install firewalld and set new rules:

Last updated