-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstandoff.1
73 lines (71 loc) · 2.42 KB
/
standoff.1
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
.\"
.\"Copyright (c) 2020 Joseph Fierro <joseph.fierro@runbox.com>
.\"
.\"Permission to use, copy, modify, and distribute this software for any
.\"purpose with or without fee is hereby granted, provided that the above
.\"copyright notice and this permission notice appear in all copies.
.\"
.\"THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\"WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\"MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\"ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.Dd $Mdocdate: April 18 2020 $
.Dt STANDOFF 1
.Os
.Sh NAME
.Nm standoff
.Nd Easy automated remote configuration tool
.Sh SYNOPSIS
.Nm standoff.pl
.Op Fl p
.Fl f Ar payload_file
.Op Fl f Ar payload_file2
.Sh DESCRIPTION
The
.Nm
tool performs automated remote configuration of servers via SSH.
The following options determine behavior:
.Bl -tag -width Dsssigfile
.It Fl f Ar payload_file
The payload file. This is a text file in INI format (see examples below for format).
Multiple payload files may be
given by specifying the -f option again.
.It Fl p
Run
.Nm
in "pull mode".
.Nm
will connect to the target in the [Target] section, download the files listed in the
[Files] section of the payload file,
and then execute all commands in the [Commands] section locally.
.El
.Sh EXAMPLES
.Pp
An example of a simple, valid payload file is as follows:
.Dl [Target]
.Dl target=172.16.1.1
.Dl ssh_key=/path/to/ssh/key
.Dl [Files]
.Dl file=httpd.conf
.Dl [Commands]
.Dl command=doas cp httpd.conf /etc
.Dl command=doas rcctl reload httpd
.Pp
To run this payload, execute the following:
.Dl $ standoff -f payload_file
.Pp
This will first connect to the target, 172.16.1.1, using the SSH key found at /path/to/ssh_key.
It will upload the file "httpd.conf" to the remote user's home directory, then execute the commands
in order. Files are always uploaded before commands are run.
.Pp
If either the [Commands] or [Files] sections is not present,
.Nm
will simply ignore that section. Likewise, the ssh_key parameter in the [Target] section is
optional.
.Nm
will attempt to connect via passphrase-based authentication if it is not supplied.
.Sh AUTHOR
Joseph Fierro <joseph.fierro@runbox.com>