๐Ÿ“ฑ Mobile Terminal Access

Claude Code
Forever Terminal

Run Claude Code from your phone, anywhere, anytime. Persistent sessions that survive disconnections.

๐Ÿ—๏ธ Architecture Overview

๐Ÿ“ฑ
Your Phone
Termius App
โ†’
๐Ÿ”
SSH + Keys
Secure Connection
โ†’
โ˜๏ธ
Cloud VPS
Hostinger/Any VPS
โ†’
๐Ÿ–ฅ๏ธ
tmux + Claude
Persistent Session
1

Set Up Your Cloud VPS

Your "Forever Terminal" that runs 24/7

โ–ผ
๐Ÿ’ก
Hostinger offers a Claude Code pre-installed template. Any VPS provider works (DigitalOcean, Linode, Vultr, etc.)
Choose a VPS provider and create an account
Select VPS plan (KVM 2 recommended for serious work)
Choose Claude Code OS template (or Ubuntu 22.04/24.04)
Set a strong root password
Note your server IP address or DNS name

If NOT using Claude Code template, install manually:

Install Claude Code
# Install Node.js (required)
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

# Install Claude Code globally
npm install -g @anthropic-ai/claude-code

# Verify installation
claude --version
2

Harden Your VPS Security

Protect against brute force attacks

โ–ผ
โš ๏ธ
Your VPS is accessible to the entire internet. These security measures are essential, not optional.

1. Enable Fail2Ban (Block Brute Force Attacks)

Install & Enable Fail2Ban
# Install fail2ban
sudo apt install fail2ban -y

# Check it's running
sudo systemctl status fail2ban

2. Enable UFW Firewall

Configure Firewall
# Allow SSH port and enable firewall
sudo ufw allow 22 && sudo ufw enable

# Verify status
sudo ufw status

3. Disable Password Authentication (After Setting Up SSH Keys)

Remove Password Auth
# Disable password auth in both config files
sudo sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo sed -i 's/^#*PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config.d/*.conf 2>/dev/null

# Restart SSH service
sudo systemctl restart sshd
โœ…
Only run Step 3 AFTER you've set up SSH key authentication in Step 4, or you'll lock yourself out!
3

Install Termius on Your Phone

Mobile SSH client for terminal access

โ–ผ
Download Termius from App Store (iOS) or Play Store (Android)
Open app and skip account creation (optional)
Skip local network access (not needed for cloud VPS)
Create new host with your VPS IP/DNS
Enter username (root) and password
Accept unknown host fingerprint
Test connection - you should see terminal
๐Ÿ“ฑ
Termius is free for basic SSH. Alternatives: Blink Shell (iOS), JuiceSSH (Android), Prompt 3 (iOS)
4

Set Up SSH Key Authentication

More secure than passwords

โ–ผ

In Termius app:

Go to Keychain (back arrow โ†’ Keychain)
Tap + icon โ†’ Generate Key
Name it (e.g., "my-key") and save
Long-press the key โ†’ Share โ†’ Export to Host
Select your VPS host and export
Edit host โ†’ Remove password โ†’ Save
Test connection (should work without password)
NOW run the disable password auth commands from Step 2
5

Configure tmux for Persistent Sessions

Sessions survive disconnections

โ–ผ
Install & Configure tmux
# Install tmux (usually pre-installed)
sudo apt install tmux -y

# Enable mouse support for better mobile experience
echo "set -g mouse on" >> ~/.tmux.conf

Essential tmux Commands

tmux Cheatsheet
# Start a new named session
tmux new -s coding

# Detach from session (keeps running)
# Press: Ctrl+B, then D

# List all sessions
tmux ls

# Attach to last session
tmux a

# Attach to named session
tmux a -t coding

# Kill a session
tmux kill-session -t coding
๐ŸŽ‰
Workflow: Start tmux โ†’ Launch Claude Code โ†’ Work โ†’ Disconnect (Ctrl+B, D or just close app) โ†’ Reconnect later โ†’ tmux a โ†’ Resume exactly where you left off!

๐Ÿค– AI Setup Assistant Prompt

Use this prompt to have an AI help you troubleshoot or customize your setup:

You are a Linux system administrator helping me set up a secure remote development environment for Claude Code on a cloud VPS. **My Setup:** - VPS Provider: [Hostinger/DigitalOcean/Linode/etc.] - OS: [Ubuntu 22.04/24.04/Debian/etc.] - Access Method: Termius mobile app via SSH - Goal: Persistent Claude Code sessions accessible from my phone **Current Status:** - [ ] VPS created and accessible - [ ] Claude Code installed - [ ] Fail2ban enabled - [ ] UFW firewall configured - [ ] SSH key authentication set up - [ ] Password authentication disabled - [ ] tmux configured with mouse support **I need help with:** [Describe your specific issue or next step] Please provide: 1. Exact commands to run 2. Expected output so I know it worked 3. Common errors and how to fix them 4. Security best practices for this step