Tổng Hợp VPS

Termius mobile SSH vào VPS: vibe code từ điện thoại Android

Setup Termius Android SSH vào VPS Ubuntu, kết hợp Bluetooth keyboard + tmux + Claude Code. Vibe code mọi nơi, key sync, snippets, biometric unlock.

Thanh Nguyễn Cập nhật Đăng 8 phút đọc 2 khối lệnh

Termius mobile SSH vào VPS: vibe code từ điện thoại Android
Mục lục bài viết
  1. 1. Vì sao Termius thắng các SSH client khác?
  2. 2. Cài và setup Termius Android
  3. 3. Generate SSH key trên VPS hoặc trong Termius
  4. 4. Add host VPS
  5. 5. tmux session chứa Claude Code
  6. 6. Snippets cho command hay dùng
  7. 7. Bluetooth keyboard - game changer
  8. 8. Tối ưu UI cho mobile
  9. 9. Port forwarding để truy cập service local VPS
  10. 10. Sync giữa Pixel + iPad + Laptop
  11. 11. Mẹo battery và data
  12. 12. Use case thực tế
  13. FAQ

Vibe coding 2026 không bị giới hạn ở laptop. Với VPS chạy Claude Code + tmux, bạn có thể SSH từ điện thoại Android, viết code, deploy, monitor production - mọi lúc mọi nơi. Termius là SSH client nổi bật hiện tại, UI hiện đại, sync key tự động, miễn phí cho cá nhân. Kết hợp Bluetooth keyboard nhỏ gọn, trải nghiệm gần ngang ngửa laptop cho task nhanh.

Bài này hướng dẫn setup Termius Android + Bluetooth keyboard + tmux trên VPS Cloud TND để code mọi nơi. Tips từ kinh nghiệm 1 năm vibe code từ Pixel 8 + Logitech K580, hoàn thành 2 SaaS feature trên đường đi du lịch.

Mục tiêu cuối bài: bạn có Termius Android cài SSH key, connect VPS <3 giây, tmux session chứa Claude Code chạy 24/7, có thể vibe code từ bất kỳ đâu có 4G/wifi.

1. Vì sao Termius thắng các SSH client khác?

ClientPlatformFree tierKey syncSnippets
TermiusiOS/Android/Mac/Win/LinuxCó (1 device)Cloud (Pro)Có (Pro)
JuiceSSHAndroid onlyCóKhôngCó
TabbyCross-platformFree hoàn toànLocalCó
Blink ShelliOS only20$ paidCóCó
ConnectBotAndroid onlyFree FOSSKhôngHạn chế

Termius mạnh nhất ở: UI polish, sync giữa thiết bị (Pro), Pro 8$/tháng tương đương Slack lite. Free tier 1 device đủ cho ai chỉ dùng 1 điện thoại. Mình recommend Pro nếu vibe code thường xuyên từ nhiều thiết bị.

2. Cài và setup Termius Android

  • Tải từ Google Play: Termius - SSH client.
  • Mở app, tạo account (Email + password).
  • Bật biometric unlock (Fingerprint/Face) trong Settings -> Security.
  • Cho phép app chạy nền (Battery -> Don't optimize).

3. Generate SSH key trên VPS hoặc trong Termius

Terminal3. Generate SSH key trên VPS hoặc trong Termiusbash
# Cách 1: Tạo key trên VPS, exportssh-keygen -t ed25519 -f ~/.ssh/termius-mobile -C "termius"cat ~/.ssh/termius-mobile      # private key, copy pastecat ~/.ssh/termius-mobile.pub  # public key, append vào ~/.ssh/authorized_keys # Trong Termius: Keychain -> Add Key -> Paste private key# Đặt tên "vps-key", optional passphrase
  • Cách 2: Generate key trong Termius. Keychain -> New Key -> ED25519. Export public key, paste vào ~/.ssh/authorized_keys trên VPS.
  • Khuyến nghị passphrase ngắn 4-6 ký tự + biometric. Khi unlock biometric, app tự nhập passphrase.

4. Add host VPS

  • Hosts -> Add Host.
  • Label: "VPS TND Pro".
  • Address: 1.2.3.4 hoặc your-domain.com.
  • Port: 22.
  • Username: dev.
  • Authentication: Key -> chọn vps-key vừa tạo.
  • Save -> tap host để connect, lần đầu xác nhận host fingerprint.

5. tmux session chứa Claude Code

Terminal5. tmux session chứa Claude Codebash
# Lần đầu SSH vào VPS, setup tmuxsudo apt install -y tmuxtmux new -s claude # Trong tmux, mở Claude Codecd ~/projects/myappclaude # Detach: Ctrl+B rồi D# Sau này từ Termius mobile:tmux attach -t claude# Quay lại Claude session đang chạy

tmux giữ session sống vĩnh viễn (đến khi VPS restart). Mobile SSH disconnect không kill task. Mở lại session sau 1-2 phút, vẫn thấy state cũ.

6. Snippets cho command hay dùng

  • Snippets -> Add Snippet.
  • Ví dụ: "attach claude" -> .
  • "git status all" -> cd ~/projects/myapp && git status.
  • "deploy" -> cd ~/projects/myapp && git pull && npm install && pm2 restart all.
  • Trong session, swipe up phía dưới hiện snippet bar, tap để paste.

Snippets là tính năng tốt Termius. Một tap thay vì gõ 20 ký tự trên màn hình nhỏ. Sync giữa thiết bị nếu Pro.

7. Bluetooth keyboard - game changer

  • Keyboard recommend: Logitech K380, K580 (compact, 3 device switch).
  • Pair Bluetooth lần đầu: Settings -> Bluetooth -> Pair K580.
  • Termius auto-detect physical keyboard, hiện normal terminal layout.
  • Key map: Esc, Ctrl, Tab, Arrow đầy đủ. Map Caps Lock -> Ctrl trong Settings keyboard nếu cần.

Với physical keyboard, tốc độ gõ ~70% laptop (do màn hình nhỏ phải xoay đầu nhìn). Đủ cho debug, sửa code nhanh, viết prompt Claude. Không thay laptop full-time được nhưng đủ cho 80% task khẩn cấp.

8. Tối ưu UI cho mobile

  • Settings -> Appearance -> Font size 16-18px (default 12 quá nhỏ).
  • Theme: Solarized Dark hoặc One Dark - dễ nhìn ngoài trời.
  • Cursor blink: tắt cho đỡ rối mắt.
  • Haptic feedback: bật, mỗi key tap rung nhẹ - feel gõ tự nhiên hơn.
  • Auto-rotate: bật, landscape mode rộng terminal hơn.

9. Port forwarding để truy cập service local VPS

  • Hosts -> chọn VPS -> Port Forwarding -> Add Rule.
  • Type: Local Forwarding.
  • Bind Address: 127.0.0.1, Bind Port: 3000.
  • Host: localhost, Port: 3000 (port trên VPS).
  • Save và connect.
  • Trong Chrome mobile: mở http://localhost:3000 -> thấy app Next.js đang chạy trên VPS.

Port forward cho phép xem dev server (Next.js dev :3000, Vite :5173) trên mobile browser mà không expose public. Cũng dùng được cho pgAdmin (5432), Grafana (3000), n8n (5678).

10. Sync giữa Pixel + iPad + Laptop

  • Termius Pro (8$/tháng) sync: hosts list, SSH key (encrypted), snippets, port forward rules.
  • Mua key trên Pixel, paste vào server, ngay tức khắc dùng trên iPad Termius (cài cùng account).
  • Đổi password account, mọi device buộc re-auth.
  • 2FA: bật trong Settings -> Security cho safety.

11. Mẹo battery và data

  • SSH session idle dùng <1% battery/giờ. Active gõ +stream Claude code ~5-8%/giờ.
  • Data 4G: stream Claude output ~5-15 MB/giờ. Plan 1GB/ngày dư sức.
  • Wifi gigabit quán cafe: speed first token Claude xuống <1 giây.
  • Sleep mode mobile: Termius hold session đến khi network drop, tự reconnect khi mở lại.

12. Use case thực tế

  • Fix bug khẩn cấp khi đang đi đường: SSH, git pull, sửa file, git push, deploy.
  • Monitor server: htop, journalctl -fu app, docker logs - khi alert Telegram.
  • Quick prompt Claude code: gõ task từ điện thoại, để VPS chạy đêm, sáng review.
  • Restart service crash: pm2 restart all, systemctl restart nginx.
  • Code chill ở quán cà phê: laptop ở nhà, mang theo điện thoại + K380 keyboard nhỏ gọn.

FAQ

Termius free tier có đủ dùng không?

Đủ cho 1 device, 5 host, không sync, không snippet. Nếu chỉ có 1 điện thoại, vibe code casual thì free tier OK. Cần snippet quick command, sync giữa Pixel + iPad + laptop -> Pro 8$/tháng worth nó. Có yearly plan giảm ~30%.

Bluetooth keyboard nào phù hợp cho mobile coding?

Logitech K380 (~600k VND, 380g, slim, 3 device switch) là sweet spot. K580 thêm numpad (700k, 540g). Keychron mechanical (~2-3tr) cho fan cơ học, nặng. Cá nhân mình mang K380 theo trong balo, lúc nào cũng dùng được kèm Pixel hoặc iPad.

SSH qua 4G/5G có an toàn không?

An toàn nếu dùng SSH key (không password), key có passphrase, biometric unlock app. Traffic SSH đã encrypt, mạng 4G/5G chỉ nhìn được encrypted bytes. Tránh: SSH password authentication, dùng SSH key không passphrase trên thiết bị unlock dễ. Bonus: setup fail2ban trên VPS chặn brute force.

Có chạy Claude Code trực tiếp trên Android (không SSH) được không?

Có thể qua Termux + npm install global Claude Code. Nhưng RAM Android giới hạn (4-8GB), khó chạy Node + Claude smoothly. Mô hình SSH vào VPS chạy Claude là pattern tốt: VPS đảm nhận compute, mobile chỉ thin client. Pin và bandwidth tiết kiệm hơn nhiều.

Termius có hỗ trợ Mosh không?

Có (Pro feature). Mosh ưu việt cho mobile: connection persistent qua network change (4G -> wifi), local echo nhanh hơn SSH. Setup: cài mosh trên VPS, trong Termius chọn protocol Mosh khi connect. Trải nghiệm typing mượt hơn SSH thuần trên 4G yếu.

Lỡ mất điện thoại thì sao?

Termius account có Remote Wipe: login web termius.com, deauthorize device mất, app trên đó sẽ xoá hết key + history khi mở lại. Nếu key có passphrase, kẻ trộm chưa unlock được. Best practice: dùng SSH key riêng cho mobile (revoke trên VPS không ảnh hưởng laptop), passphrase 6+ ký tự, biometric unlock.

Chia sẻ:Facebook

Thanh Nguyễn

TND

Tư vấn bản quyền, VPS và máy chủ kèm hóa đơn VAT, hợp đồng đầy đủ cho doanh nghiệp.