Access [Local]

Oracle Cloud VPS do not allow password-based SSH by default. You must use a private key (.pem or id_rsa) to authenticate. The -i flag tells SSH which private key file to use.

ssh -i ~/.ssh/id_rsa ubuntu@<server-ip>

Update & Upgrade [Server]

Always update a fresh VPS to get the latest security patches and package versions before installing anything.

sudo apt update && sudo apt upgrade -y

Add Non-Root User & Sudo [Server]

Running as root is risky — a single mistake can break the system. Create a non-root user with sudo for day-to-day tasks.

sudo adduser <username>
sudo usermod -aG sudo <username>

Verify with: groups <username> — this confirms sudo access was granted.

sudo passwd <username>

Set a password so you can use sudo (sudo prompts for your user password, not root's).

SSH Key Setup for New User [Local → Server]

Oracle disables password SSH by default — only key-based auth works. Since your new user has no .ssh folder, you must copy the authorized_keys from the default user. Always use full paths (/home/username/...) to avoid creating folders in the wrong directory.

Your new user doesn't have the SSH key yet. Connect as the default Oracle user first:

ssh -i ~/.ssh/id_rsa ubuntu@<server-ip>