DocHub
Color-coded SSH login gateway, tmux status bars, and /terminal skill for the 5 OVH5 LXC containers

Login Gateway & Session Identity

Problem

Working across 5 LXC containers is confusing. It’s easy to lose track of which container you’re in, especially when multiple terminal tabs are open or covering for someone. The old setup dropped you straight into tmux with minimal visual cues.

Solution: Three Layers of Identity

Layer 1: Login Gateway

On SSH login, before tmux or Claude, a color-coded banner identifies the container and offers a choice:

  • [1] or Enter — Joins tmux session, starts Claude if not running
  • [2] — Drops to plain bash with color-coded PS1 showing container name
  • [q] — Disconnects SSH

The banner shows the container name (large, uppercase), owner, and IP address, all in the container’s assigned color. It also detects whether Claude and tmux are currently running and displays the status.

Guards in .bashrc ensure the gateway only runs for interactive shells, not inside tmux, and not when re-entering bash from the plain terminal option.

Layer 2: Color-Coded tmux Status Bar

The tmux status bar at the bottom is permanently color-coded per machine. This is always visible during the session.

Machine Color Status bar shows
laptopclaude Blue laptopclaude - Chas
serclaude Orange serclaude - Chas
chasclaude Cyan chasclaude - Chas
infoclaude Green infoclaude - Chas
seanclaude Yellow seanclaude - Sean
jazclaude Magenta jazclaude - Jaz
managerclaude Silver managerclaude - Shared

Each config also sets terminal titles (tab/title bar shows container name), color-coded pane borders, and active window highlighting.

Layer 3: AI Identity

Each machine has a ~/.claude/CLAUDE.md (the user-level file Claude Code always loads) that tells the AI:

  • Its name and who it belongs to
  • Its container IP, port, and Claude Net identity
  • That it operates ONLY inside its own container
  • It must ask before touching anything outside (other containers, servers)
  • The full server map with purposes and rules
  • All 5 container details
  • Its GitHub identity

Auto-Start Claude

When option [1] is chosen, the tmux session script handles three cases:

  1. tmux session exists and Claude is running: attaches directly
  2. tmux session exists but Claude is NOT running: sends claude command, then attaches
  3. No tmux session: creates one, starts Claude, attaches

Session logging via pipe-pane is always activated on attach.

The /terminal Skill

A Claude Code skill that opens a plain bash window within tmux:

  • Creates a new tmux window named “terminal” (or switches to it if it already exists)
  • User runs sudo, Docker, or bash commands there
  • Switch back to Claude window with Ctrl-b 0 or Ctrl-b p

This eliminates the need to detach from tmux just to run a quick shell command.

File Locations

File Purpose
~/.login-gateway.sh Login banner and session menu
~/.tmux-session.sh tmux session management with Claude auto-start
~/.tmux.conf Color-coded tmux configuration
~/.bashrc (tail) Gateway invocation + plain terminal PS1 override
~/.claude/CLAUDE.md AI identity and operational boundaries
~/.claude/commands/terminal.md /terminal skill

Deployed To

All 5 LXC containers on OVH5, plus the laptop (laptopclaude) and ser8 (serclaude) with their own colors and identity files.

Date

Deployed 2026-03-01.