Learning HubACFS Academy
Progress
0%
0 of 2020 remaining
  • 1
    Welcome & Overview5 min
  • 2
    Linux Navigation8 min
  • 3
    SSH & Persistence6 min
    NOW
  • 4
    tmux Basics7 min
  • 5
    Git Essentials10 min
  • 6
    GitHub CLI8 min
  • 7
    Agent Commands10 min
  • 8
    NTM Command Center8 min
  • 9
    NTM Prompt Palette6 min
  • 10
    The Flywheel Loop10 min
  • 11
    Keeping Updated4 min
  • 12
    UBS: Code Quality Guardrails8 min
  • 13
    Agent Mail Coordination10 min
  • 14
    CASS: Learning from History8 min
  • 15
    The Memory System8 min
  • 16
    Beads: Issue Tracking8 min
  • 17
    Safety Tools: SLB & CAAM6 min
  • 18
    The Art of Agent Direction12 min
  • 19
    Case Study: cass-memory15 min
  • 20
    Case Study: SLB12 min
Back to Home
Back
3/20
Lesson 3
6 min

SSH & Persistence

Master secure connections and stay connected

New to ACFS?

Complete the setup wizard first to get the most from these lessons.

Go to SSH Into Your VPS
Goal

Understand how to stay connected to your VPS.

What Is SSH?

SSH (Secure Shell) is how you're connected to this VPS right now.

It's an encrypted tunnel between your laptop and this server.

Your Laptop
Encrypted SSH
Your VPS

How You Got Here

Your VPS connection happened in two stages:

1

Password Login

During Setup

When you first created your VPS, you connected as root with a password

ssh root@YOUR_SERVER_IP
2

Key-Based Login

Now

The installer copied your SSH key, so now you connect securely

ssh -i ~/.ssh/acfs_ed25519 ubuntu@YOUR_SERVER_IP

Breaking down the command:

sshThe command
-i ~/.ssh/acfs_ed25519Your private key
ubuntuYour regular user (safer than root)
@YOUR_SERVER_IPThe server address

If Your Connection Drops

Note
No worries! SSH connections drop sometimes. Just reconnect—your work is safe in tmux (next lesson).

SSH Keys vs Passwords

You're now using key-based authentication:

Private Key

Stays on your laptop at ~/.ssh/acfs_ed25519

Public Key

Lives on the VPS at ~/.ssh/authorized_keys

This is more secure than passwords and lets you connect without typing anything.

Keeping Connections Alive

Add this to your laptop's ~/.ssh/config:

~/.ssh/config
Host *
ServerAliveInterval 60
ServerAliveCountMax 3

This sends keepalive packets every 60 seconds.

Quick Connect Alias

On your laptop, add to ~/.zshrc or ~/.bashrc:

bash
alias vps='ssh -i ~/.ssh/acfs_ed25519 ubuntu@YOUR_SERVER_IP'

Then just type vps to connect!

Verify Your Understanding

1

Where does your private key live?

~/.ssh/acfs_ed25519 on your laptop

2

What happens if SSH drops?

Reconnect; tmux saves your work

3

What's the quick way to reconnect?

Use an alias

Practice This Now

Try these commands to confirm your SSH setup is working:

bash
1# Check your current user (should say "ubuntu")
2$ whoami
3
4# Check how long you've been connected
5$ w
6
7# View the public keys authorized to access this account
8$ cat ~/.ssh/authorized_keys
Pro Tip
When you see your public key (starts with ssh-ed25519), you know the setup worked!

Ready to level up?

Mark complete to track your learning progress.

Previous
Linux Navigation
Next
tmux Basics