Remote Access Runbook
Overview
This runbook covers all methods of remotely accessing your Arch Linux PC, transferring files, running commands, and managing your system from anywhere.SSH Access
Basic SSH Connection
SSH with Different Port
If you’ve changed SSH from default port 22:Keeping SSH Sessions Alive
Add to~/.ssh/config on your client machine:
Running Single Commands
No need to stay logged in:SSH Keys (Passwordless Authentication)
Generate SSH Key Pair (if you don’t have one)
On your client machine:- Press Enter to accept default location (~/.ssh/id_ed25519)
- Set a passphrase or leave empty for no passphrase
Copy Public Key to Arch PC
Easiest method:Test Passwordless Login
File Transfer
SCP (Secure Copy)
From remote to local:SFTP (Interactive File Transfer)
SSHFS (Mount Remote Filesystem)
Install on client machine:- Arch/Linux:
sudo pacman -S sshfs - Mac:
brew install macfuse && brew install sshfs - Windows: Use WinFsp + SSHFS-Win
Rsync (Efficient Sync)
Sync local to remote:-a= archive mode (preserves permissions, timestamps)-v= verbose-z= compress during transfer--progress= show progress--delete= delete files on destination that don’t exist in source
Remote Desktop Access
GNOME Remote Desktop (VNC/RDP)
On Arch PC:- Install:
-
Enable in GNOME Settings:
- Open Settings → Sharing
- Turn on “Remote Desktop”
- Set a password
- Enable “Allow connections to control the screen”
- Check it’s running:
- Linux: Use Remmina, GNOME Connections, or vinagre
- Windows: Use built-in Remote Desktop Connection (RDP) or TightVNC
- Mac: Use built-in Screen Sharing or Microsoft Remote Desktop
arch-desktop (via Tailscale) or 100.x.x.x
X11 Forwarding (Run GUI Apps)
Connect with X11 forwarding:VNC Server (Alternative)
Install TigerVNC:- Use any VNC viewer (TightVNC, RealVNC, etc.)
- Connect to
arch-desktop:5901
Persistent Terminal Sessions
tmux (Recommended)
Install:Ctrl+b then d
Reattach later:
Ctrl+bthenc= create new windowCtrl+bthenn= next windowCtrl+bthenp= previous windowCtrl+bthen"= split horizontallyCtrl+bthen%= split verticallyCtrl+bthen arrow keys = move between panes
screen (Alternative)
System Management Commands
Check System Status
Package Management
Service Management
Port Forwarding
Local Port Forwarding
Access a service on the remote machine via your local machine:http://localhost:8080 on your local machine accesses port 80 on the remote.
Practical example - Remote web server:
Remote Port Forwarding
Expose a local service on the remote machine:Dynamic Port Forwarding (SOCKS Proxy)
localhost:1080 as a SOCKS5 proxy. Now all browser traffic goes through your Arch PC.
Wake-on-LAN (Power On Remotely)
Prerequisites
- Motherboard must support WoL
- Must be enabled in BIOS/UEFI
- Network cable must be connected (doesn’t work over WiFi typically)
Enable WoL on Arch PC
- Check if supported:
enp3s0 with your network interface - find it with ip link)
- Enable WoL:
- Make it persistent:
Create
/etc/systemd/system/wol.service:
Wake Up Your PC
Get MAC address first (while PC is on):link/ether aa:bb:cc:dd:ee:ff
From Linux/Mac:
Security Best Practices
Change Default SSH Port
Edit/etc/ssh/sshd_config on Arch PC:
Disable Password Authentication
After setting up SSH keys, edit/etc/ssh/sshd_config:
Disable Root Login
In/etc/ssh/sshd_config:
Use fail2ban
Automatically ban IPs after failed login attempts:Enable Firewall
Troubleshooting
Can’t Connect via SSH
- Check SSH is running on Arch PC:
- Check firewall:
- Check from local network first:
- Verbose connection attempt:
Connection Drops Frequently
Add to~/.ssh/config on client:
Slow SSH Connection
Add to/etc/ssh/sshd_config on server:
“Permission Denied (publickey)”
- Check authorized_keys permissions on server:
- Check SSH key is added on client:
Useful SSH Config
Create/edit~/.ssh/config on your client machine:
Quick Reference
| Task | Command |
|---|---|
| SSH connect | ssh user@host |
| SSH with key | ssh -i ~/.ssh/key user@host |
| Copy file to remote | scp file.txt user@host:/path/ |
| Copy file from remote | scp user@host:/path/file.txt ./ |
| Mount remote filesystem | sshfs user@host:/path ~/mount |
| X11 forwarding | ssh -X user@host |
| Port forward | ssh -L 8080:localhost:80 user@host |
| Start tmux session | tmux new -s name |
| Detach tmux | Ctrl+b then d |
| Reattach tmux | tmux attach -t name |
| Check SSH status | sudo systemctl status sshd |
Mobile Access
SSH Apps
Android:- JuiceSSH (recommended)
- Termux
- ConnectBot
- Termius (freemium)
- Blink Shell
- Prompt
Remote Desktop Apps
Android/iOS:- Microsoft Remote Desktop (for RDP)
- VNC Viewer
- Chrome Remote Desktop
Performance Tips
For File Transfers
Use compression for text files:For Remote Desktop
Lower resolution and color depth:For SSH Sessions
Enable compression for slow connections:Automation Scripts
Daily Backup Script
backup.sh, make executable:
crontab -e
Health Check Script
Notes
- Always use Tailscale for remote access when possible - it’s the most secure and reliable method
- Keep your SSH keys secure - never share private keys
- Use tmux for long-running tasks that shouldn’t be interrupted
- Regular backups of important data
- Test your remote access setup before you actually need it in an emergency