Introduction
Your work persists, no matter where you are
Learn to build persistent remote workflows that survive network drops, SSH disconnects, and system reboots. This module provides the scripts, checklists, and templates you need to operate effectively from anywhere.
- Build an "Ops Copilot" tmux session with automated layout scripts
- Secure remote access with proper authentication and audit trails
- Establish on-call routines and incident response procedures
Lesson 3.1: Building an "Ops Copilot" Session
Your always-on operational assistant
Create ops-main Session
Instead of manually creating your tmux session each time, use the ops-layout.sh script to create a standardized layout with monitoring and Claude panes already configured.
#!/usr/bin/env bash # Create a standard tmux layout for daily operations. # Usage: ops-layout.sh [SESSION_NAME] SESSION_NAME="${1:-ops-main}" tmux has-session -t "$SESSION_NAME" 2>/dev/null if [ $? -eq 0 ]; then echo "Session $SESSION_NAME already exists. Attaching..." tmux attach -t "$SESSION_NAME" exit 0 fi echo "Creating tmux session: $SESSION_NAME" tmux new-session -d -s "$SESSION_NAME" -n monitor # Pane 1: Claude (user runs 'claude' here when ready) # Pane 2: Logs / monitoring commands tmux split-window -v -t "$SESSION_NAME:monitor" tmux select-pane -t "$SESSION_NAME:monitor".1 # Window 2 for tickets / investigations tmux new-window -t "$SESSION_NAME" -n tickets tmux select-window -t "$SESSION_NAME:monitor" tmux attach -t "$SESSION_NAME"
Ops Copilot SOP Overview
- SSH to your ops server
- Run
ops-layout.sh ops-mainto create/attach session - Start Claude in pane 1:
claude - Start monitoring in pane 2:
tail -f /var/log/syslog - Use Claude to summarize logs, explain errors, draft commands
Lesson 3.1 Resources
Lesson 3.2: Remote Access Security
Secure your remote workflows
Security Best Practices
Before running Claude on any remote system, ensure you have proper authentication, authorization, and audit controls in place.
Remote Access Checklist Preview
- SSH key set up (no password-only logins)
- MFA enabled where possible (VPN, bastion, etc.)
- SSH config entry for ops host in
~/.ssh/config - This host is approved for Claude-assisted work
- Shell history is enabled for audit
- Important Claude sessions are saved/exported
# ~/.ssh/config Host ops-box HostName YOUR_HOSTNAME User YOUR_USER IdentityFile ~/.ssh/YOUR_KEY
- Use SSH keys, not passwords - Generate a dedicated key for ops work
- Enable MFA where possible - Especially for VPN and bastion hosts
- Document approved access methods - Know which hosts allow Claude
- Log and audit Claude transcripts - Save important sessions for review
Lesson 3.2 Resources
Lesson 3.3: On-Call Routines
Daily workflows and incident response
Morning Ops Routine
Start each day with a consistent routine that leverages Claude to review overnight activity and plan your day.
Daily Morning Checklist
- Attach to ops session:
tmux attach -t ops-main - Review monitoring pane for red/failed health checks
- Check for unusual CPU/disk usage or failed jobs
- Ask Claude to summarize overnight logs and issues
- Update Daily Ops Notebook with incidents/anomalies
- Ask Claude to suggest 1-2 improvements for the week
# 1. Attach to ops-main tmux attach -t ops-main # 2. Review overnight logs in monitoring pane # 3. Ask Claude for summary: # "Here are the logs from our overnight jobs. # Please summarize issues that might impact # today's business operations." # 4. Update daily notebook # 5. Ask Claude for improvement suggestions
Incident Response
When incidents occur, use a structured template to document what happened, how Claude helped, and lessons learned.
Incident Template Sections
- What happened: Date/time, systems affected, business impact
- What I saw in tmux: Logs, commands run
- Claude's help: Summaries, suggested commands, accepted/rejected
- Resolution: Root cause, fix applied, follow-up tasks
- Lessons learned: Layout changes, SOP updates needed