-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathhostmux.mandoc
78 lines (78 loc) · 2.25 KB
/
hostmux.mandoc
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.Dd April 7, 2017
.Dt HOSTMUX 1
.Os
.Sh NAME
.Nm hostmux
.Nd Connects to a list of hosts via ssh in separate tmux split panes
.Sh SYNOPSIS
.Nm
.Op Fl h
.Op Fl s Ar session-name
.Op Fl l Ar tmux-layout
.Op Fl f Ar host_file
.Op Fl c Ar ssh command
.Op Fl o Ar ssh option
.Op Fl x
.Op Fl p
.Op Fl P
.Op Fl a
.Ar host1
.Ar [host2
.Ar ...]
.Sh DESCRIPTION
Call hostmux followed by a list of hosts you want to connect to via ssh.
The script will create a new tmux session with a split pane for each
specified host and connect to it.
.Pp
You can then use the synchronize-panes feature of tmux to
multiplex/broadcast commands to all split panes / servers (see -a).
.Pp
Its arguments are as follows:
.Bl -tag -width Ds
.It Fl s Ar session-name
Specify a name for the tmux session. It defaults to 'hostmux' which means that
you can have only one hostmux session at a time if you don't specify unique
names for your sessions
.It Fl l Ar tmux-layout
Specify a valid tmux layout e.g. even-horizontal, tiled, etc. It defaults to
\'even-vertical\'
.It Fl f Ar hostfile
Specify a file which contains a newline separated list of [user@]host names. The
hosts from the file will be merged with the hosts provided as optional arguments
.It Fl x
Close the pane and/or session automatically when the ssh session
exits successfully
.It Fl p
Identify panes by setting the pane title to the ssh hostname (tmux >= 2.3), may
not work if the remote host does $PS1 magic like setting the terminal title,
in that case use
.Fl P
.It Fl P
Identify panes by setting the remote prompt $PS1 to "[<hostname>]$ " after
login
.It Fl a
Synchronize all panes, i.e. type commands simultaneously in all panes
.It Fl c
Specify the (wrapper) ssh command. It defaults to "ssh"
.It Fl o
Specify additional ssh options such as -vvvv, -i or -p
.It Fl h
Display usage information
.It Ar host
Specify a space separated list of one or more user@hostname ssh targets. This
is what you would pass to the ssh command when you are connecting
to a host. You can pass additional flags to ssh either with the -o option or
by adding them to your ~/.ssh/config
.El
.Sh SEE ALSO
.Bl -tag -width Ds
.It Xr tmux 1
.It Lk /~https://github.com/hukl/hostmux
.El
.Sh EXIT STATUS
.Ex -std
.Sh AUTHORS
.Nm
was written by
.An John-Paul Bader (hukl) ,
.Mt contact@smyck.org .