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.
How You Got Here
Your VPS connection happened in two stages:
Password Login
During SetupWhen you first created your VPS, you connected as root with a password
ssh root@YOUR_SERVER_IPKey-Based Login
NowThe installer copied your SSH key, so now you connect securely
ssh -i ~/.ssh/acfs_ed25519 ubuntu@YOUR_SERVER_IPBreaking down the command:
sshThe command-i ~/.ssh/acfs_ed25519Your private keyubuntuYour regular user (safer than root)@YOUR_SERVER_IPThe server addressIf Your Connection Drops
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:
Host *ServerAliveInterval 60ServerAliveCountMax 3
This sends keepalive packets every 60 seconds.
Quick Connect Alias
On your laptop, add to ~/.zshrc or ~/.bashrc:
alias vps='ssh -i ~/.ssh/acfs_ed25519 ubuntu@YOUR_SERVER_IP'
Then just type vps to connect!
Verify Your Understanding
Where does your private key live?
~/.ssh/acfs_ed25519 on your laptop
What happens if SSH drops?
Reconnect; tmux saves your work
What's the quick way to reconnect?
Use an alias
Practice This Now
Try these commands to confirm your SSH setup is working:
1# Check your current user (should say "ubuntu")2$ whoami34# Check how long you've been connected5$ w67# View the public keys authorized to access this account8$ cat ~/.ssh/authorized_keys
ssh-ed25519), you know the setup worked!