Skilllibrary ssh-tmux-remote-workflow
install
source · Clone the upstream repo
git clone https://github.com/merceralex397-collab/skilllibrary
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/merceralex397-collab/skilllibrary "$T" && mkdir -p ~/.claude/skills && cp -r "$T/10-cli-systems-and-ops/ssh-tmux-remote-workflow" ~/.claude/skills/merceralex397-collab-skilllibrary-ssh-tmux-remote-workflow && rm -rf "$T"
manifest:
10-cli-systems-and-ops/ssh-tmux-remote-workflow/SKILL.mdsource content
Purpose
Configure SSH connections, key management, jump hosts, and tmux sessions for reliable remote workflows.
When to use this skill
- setting up
with host aliases, ProxyJump, and multiplexing~/.ssh/config - creating persistent tmux sessions for long-running remote work
- syncing files between local and remote with
rsync - debugging SSH connection failures or key issues
Do not use this skill when
- writing systemd unit files on the remote host — prefer
systemd-services - the task is container orchestration — different domain
- doing local terminal debugging — prefer
terminal-debugging
Procedure
- Generate keys —
. Copy:ssh-keygen -t ed25519 -C "user@machine"
.ssh-copy-id user@host - Configure SSH — edit
with host blocks for aliases, jump hosts, multiplexing.~/.ssh/config - Enable multiplexing —
,ControlMaster auto
,ControlPath ~/.ssh/sockets/%r@%h-%p
.ControlPersist 600 - Jump hosts — use
to reach internal hosts through a bastion.ProxyJump bastion - Persistent tmux —
.ssh host -t 'tmux new -s work || tmux attach -t work' - Sync files —
.rsync -avz --exclude .git/ ./src/ host:~/project/src/ - Port forwarding —
for local access to remote services.ssh -L 8080:localhost:3000 host - Debug —
for verbose output; checkssh -vvv host
on server./var/log/auth.log
SSH config example
Host * AddKeysToAgent yes IdentityFile ~/.ssh/id_ed25519 ControlMaster auto ControlPath ~/.ssh/sockets/%r@%h-%p ControlPersist 600 ServerAliveInterval 60 Host bastion HostName bastion.example.com User deploy Host internal HostName 10.0.1.50 User deploy ProxyJump bastion
tmux essentials
tmux new -s dev # new named session tmux attach -t dev # reattach # Ctrl-b d detach Ctrl-b c new window # Ctrl-b % vsplit Ctrl-b " hsplit
Decision rules
- Use
keys — faster and more secure than RSA.ed25519 - Use
overProxyJump
— config is version-controllable.ssh -J - Create
directory — missing dir causes silent multiplexing failure.~/.ssh/sockets/ - Set
to prevent dropped idle connections.ServerAliveInterval 60 - Use
to be idempotent.tmux new -s name || tmux attach -t name
References
Related skills
— server management after SSH accesslinux-ubuntu-ops
— scripting remote commandsbash
— debugging remote processesterminal-debugging