from terminal to the internet: a beginner's journey

Feb 25, 2026

A personal learning log covering SSH, GitHub CLI, Firewalls, VPNs and more.

 

 

🐙 Setting Up GitHub CLI (gh)

The gh tool lets you manage GitHub directly from your terminal.

Install on Ubuntu:

sudo apt install gh

Connect to GitHub:

gh auth login

Create a repo:

gh repo create

Delete a repo:

gh repo delete repo-name

If you get a permissions error while deleting, run:

gh auth refresh -h github.com -s delete_repo

 

 

🔑 SSH Keys

SSH uses a public/private key pair — like a lock and key:

Generate a key:

ssh-keygen -t ed25519 -C "your-machine-name"

Keys are stored in ~/.ssh/ folder:

View your public key:

cat ~/.ssh/id_ed25519.pub

Tip: You can share the same public key with multiple services (GitHub, servers etc.), but for better security create separate keys per service using the -f flag:

ssh-keygen -t ed25519 -C "github key" -f ~/.ssh/id_ed25519_github

 


 

What is a Firewall?

A firewall is like a security guard at the entrance of a building — it checks every connection coming in or going out and decides whether to allow or block it, based on rules.

Firewalls were born out of necessity after the Morris Worm (1988) — one of the first viruses that spread across the internet automatically.

How Firewalls Work

Every computer has 65,535 ports — think of them like doors:

A firewall checks the IP address and port of every connection and blocks or allows it based on rules.

 

 

🌐 Ports & Sockets

This is how your computer tracks hundreds of connections at the same time!

 

 

🔒 SSH Tunneling

SSH tunneling creates an encrypted tube between your computer and a server.

Basic SSH connection:

ssh user@server-ip

Run SSH on port 443 (to bypass firewalls that block port 22):

# On your VPS, edit SSH config
sudo nano /etc/ssh/sshd_config
# Change: Port 22 → Port 443

Then connect from anywhere:

ssh -p 443 user@your-vps-ip

Firewalls see only port 443 traffic — thinking it's normal HTTPS!

 

 

🧦 SOCKS Proxy

A SOCKS proxy routes your browser traffic through an SSH tunnel.

Create a SOCKS proxy:

ssh -D 9090 -p 443 user@your-vps-ip

Then configure your browser:

Now all browser traffic flows like this:

Browser → localhost:9090 → SSH Tunnel → Home VPS → Internet

 

 

🛡️ VPN (Virtual Private Network)

A VPN encrypts all your traffic before it leaves your computer.

Without VPN:

Your Computer → ISP → Destination

ISP can see everything — websites visited, content, passwords!

With VPN:

Your Computer → ISP → VPN Server → Destination

ISP only sees you're connected to a VPN server — nothing else!

What VPN Hides

From Hidden?
ISP ✅ Yes
Websites ✅ Yes (they see VPN's IP)
VPN Provider ❌ No

Trustworthy VPN Providers

Look for:

Well regarded options: Mullvad, ProtonVPN, Mozilla VPN

 

 

🔐 How SSH Authentication Works

  1. GitHub sends your machine a random challenge
  2. Your machine signs it with your private key
  3. GitHub verifies the signature using your public key
  4. If it matches — you're authenticated! ✅

No password needed — just math! 🎉

 

 

💡 Key Takeaways

 

 

go back to tech