Skip to main content

Command Palette

Search for a command to run...

The Server Saga

Creating the Oracle Instance and Conquering the SSH Nightmare

Updated
2 min read
The Server Saga

In the last article, I shared why I decided to ditch shared hosting and build my own server on Oracle Cloud (Free Tier). Today, we get practical: how to create the machine and, most importantly, how to get inside without losing your sanity.

It sounds simple: "Create Instance", "Download Key", "Connect". But anyone who has dealt with Linux and Cloud knows it's never that straightforward.

1. Choosing the Machine (Our "Little Beetle")

The dream setup on Oracle is the Ampere (ARM) instance with 24GB of RAM. However, since it's highly sought after, capacity is often unavailable. The strategy? Don't stand still. I provisioned an AMD Micro (E2.1) instance. It only has 1GB of RAM and 2 CPUs, but it's enough to get started.

  • Pro Tip: I chose Ubuntu 24.04 as the operating system. It's stable, modern, and has tutorials for everything.

2. The SSH Key Challenge

Unlike cPanel where you have a login password, in professional Cloud environments, we use SSH Keys. It's a file (.key) that acts like a physical key. The trouble starts when you try to use this key in the terminal.

The classic error I faced: WARNING: UNPROTECTED PRIVATE KEY FILE!

Linux is paranoid (rightfully so). If your key is in a folder where "other users" can read it, it blocks access. The solution isn't obvious for Windows users:

Bash

chmod 600 my-key.key

This command tells the system: "Only I read this. No one else." It was the first realization that I am now the one in charge of security.

3. Connecting Like a Pro (The Config File)

After fixing permissions, typing ssh -i path/to/key ubuntu@123.123.123.123 every time gets tiring. I discovered we can create a "shortcut" in our computer's ~/.ssh/config file:

Plaintext

Host oracle
    HostName 123.123.123.123
    User ubuntu
    IdentityFile ~/.ssh/my-key.key

Now, I just type ssh oracle in the terminal and I'm in.

4. What About the Firewall?

Upon entering, the first thing I noticed: Oracle's firewall (Security Lists) blocks everything by default. Trying to open port 80 or 443 requires complex configurations in the Cloud panel and the machine's iptables. But we won't suffer through that. Next week, I'll show how I bypassed the entire firewall using Cloudflare Tunnels, exposing my services with HTTPS without punching a single hole in the server's security.

Week 1 Summary: We have a free Linux server, updated, and with SSH access configured and secure. The foundation is laid. Next Tuesday, we will install the engine that will run everything: Docker.