Stop losing long-running SSH sessions when your agent disconnects.
GitHub RepoImpressions983

Stop losing long-running SSH sessions when your agent disconnects.

@githubprojectsPost Author

Project Description

View on GitHub

Stop Losing Your SSH Sessions Forever

You know the pain. You're deep in a remote terminal, running a long build or a data transfer, and suddenly your SSH connection drops. Your work is gone, your session is dead. It's frustrating, and screen or tmux don't always solve the problem when the agent disconnects. Enter rmux.

What It Does

rmux is a lightweight, Rust-based tool that wraps your SSH connections with tmux. When you SSH into a remote machine via rmux, it automatically attaches to (or creates) a persistent tmux session. If your SSH connection drops — for whatever reason — your session keeps running on the remote machine. You can simply reconnect and pick up exactly where you left off.

The key difference? rmux doesn't try to be a full terminal multiplexer. It's a thin, opinionated layer that ensures your work survives network hiccups, laptop sleep, or accidental disconnects.

Why It's Cool

  • Zero config, zero friction. Just run rmux server instead of ssh server. It handles tmux automatically.
  • Rust-native speed. No node, no Python dependencies. It's a single binary.
  • Smart reconnection. If you reconnect to the same server, it finds your existing tmux session. No duplicate sessions, no manual cleanup.
  • Works with your existing SSH config. rmux respects ~/.ssh/config and agent forwarding. You don't have to change your workflow.
  • Lightweight. No background daemons. No overhead when you're not using it.

The clever part: rmux automatically wraps your ssh command with tmux new-session -A -D -s rmux. That -A flag means "attach to an existing session with that name, or create one". This single line of tmux-fu is all it takes to never lose a session again.

How to Try It

You need Rust installed, but it's a quick cargo install:

cargo install rmux

Or grab a prebuilt binary from the releases page.

Then simply:

rmux [email protected]

That's it. Your first tunnel starts, and you're in a tmux session. Disconnect and reconnect — you'll see the same terminal state.

Final Thoughts

rmux is one of those tools that solves a specific, painful problem in a clean way. It's not revolutionary, but it's useful. If you spend any time working on remote servers (especially over unreliable connections), this is a no-brainer install. The Rust implementation means it's fast and has no runtime dependencies. I've been using it for a week and haven't had a single lost session.

Give it a shot. Your future self will thank you when the WiFi drops mid rsync.


Found this useful? Follow @githubprojects for more developer tools and projects.

Back to Projects
Project ID: d4f0b488-8f03-488c-8ca7-058e06418d18Last updated: May 23, 2026 at 03:25 AM