summaryrefslogtreecommitdiff
path: root/README.md
blob: 0cd093879b8d2c5f2cb57f540d9771370c39798f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# ssh-tmux

The `ssh-tmux` utility executes a given command via `ssh` in a new `tmux`
session on a specified host.

The intended purpose is to execute long-running interactive remote commands
with the ability to re-connect.

## Usage

The following command logs into the OpenSSH host `example.com`, creates and
attaches to a new Tmux session named `make`, and builds a project.

    $ ssh-tmux -s make example.com "cd project && make && sudo make install"

When you detach or disconnect, or simply want to watch from another client, you
can re-connect and re-attach as follows:

    $ ssh -t example.com tmux attach-session -t make

See the manual page for more examples.

## Installation

Run `make install` as root to install the `ssh-tmux` utility and man page.
Generated by cgit. See skreutz.com for my tech blog and contact information.