More man & NEWS enhancements, including linking to env vars.
[rsync.git] / rsync-ssl.1.md
1 ## NAME
2
3 rsync-ssl - a helper script for connecting to an ssl rsync daemon
4
5 ## SYNOPSIS
6
7 ```
8 rsync-ssl [--type=SSL_TYPE] RSYNC_ARGS
9 ```
10
11 The online version of this man page (that includes cross-linking of topics)
12 is available at <https://download.samba.org/pub/rsync/rsync-ssl.1>.
13
14 ## DESCRIPTION
15
16 The rsync-ssl script helps you to run an rsync copy to/from an rsync daemon
17 that requires ssl connections.
18
19 The script requires that you specify an rsync-daemon arg in the style of either
20 `hostname::` (with 2 colons) or `rsync://hostname/`.  The default port used for
21 connecting is 874 (one higher than the normal 873) unless overridden in the
22 environment.  You can specify an overriding port via `--port` or by including
23 it in the normal spot in the URL format, though both of those require your
24 rsync version to be at least 3.2.0.
25
26 ## OPTIONS
27
28 If the **first** arg is a `--type=SSL_TYPE` option, the script will only use
29 that particular program to open an ssl connection instead of trying to find an
30 openssl or stunnel executable via a simple heuristic (assuming that the
31 `RSYNC_SSL_TYPE` environment variable is not set as well -- see below).  This
32 option must specify one of `openssl` or `stunnel`.  The equal sign is
33 required for this particular option.
34
35 All the other options are passed through to the rsync command, so consult the
36 **rsync**(1) manpage for more information on how it works.
37
38 ## ENVIRONMENT VARIABLES
39
40 The ssl helper scripts are affected by the following environment variables:
41
42 0.  `RSYNC_SSL_TYPE`
43
44     Specifies the program type that should be used to open the ssl connection.
45     It must be one of `openssl` or `stunnel`.  The `--type=SSL_TYPE` option
46     overrides this, when specified.
47
48 0.  `RSYNC_SSL_PORT`
49
50     If specified, the value is the port number that is used as the default when
51     the user does not specify a port in their rsync command.  When not
52     specified, the default port number is 874.  (Note that older rsync versions
53     (prior to 3.2.0) did not communicate an overriding port number value to the
54     helper script.)
55
56 0.  `RSYNC_SSL_CERT`
57
58     If specified, the value is a filename that contains a certificate to use
59     for the connection.
60
61 0.  `RSYNC_SSL_KEY`
62
63     If specified, the value is a filename that contains a key for the provided
64     certificate to use for the connection.
65
66 0.  `RSYNC_SSL_CA_CERT`
67
68     If specified, the value is a filename that contains a certificate authority
69     certificate that is used to validate the connection.
70
71 0.  `RSYNC_SSL_OPENSSL`
72
73     Specifies the openssl executable to run when the connection type is set to
74     openssl.  If unspecified, the $PATH is searched for "openssl".
75
76 0.  `RSYNC_SSL_GNUTLS`
77
78     Specifies the gnutls-cli executable to run when the connection type is set
79     to gnutls.  If unspecified, the $PATH is searched for "gnutls-cli".
80
81 0.  `RSYNC_SSL_STUNNEL`
82
83     Specifies the stunnel executable to run when the connection type is set to
84     stunnel.  If unspecified, the $PATH is searched first for "stunnel4" and
85     then for "stunnel".
86
87 ## EXAMPLES
88
89 >     rsync-ssl -aiv example.com::mod/ dest
90
91 >     rsync-ssl --type=openssl -aiv example.com::mod/ dest
92
93 >     rsync-ssl -aiv --port 9874 example.com::mod/ dest
94
95 >     rsync-ssl -aiv rsync://example.com:9874/mod/ dest
96
97 ## SEE ALSO
98
99 [**rsync**(1)](rsync.1), [**rsyncd.conf**(5)](rsyncd.conf.5)
100
101 ## CAVEATS
102
103 Note that using an stunnel connection requires at least version 4 of stunnel,
104 which should be the case on modern systems.  Also, it does not verify a
105 connection against the CA certificate collection, so it only encrypts the
106 connection without any cert validation unless you have specified the
107 certificate environment options.
108
109 This script also supports a `--type=gnutls` option, but at the time of this
110 release the gnutls-cli command was dropping output, making it unusable.  If
111 that bug has been fixed in your version, feel free to put gnutls into an
112 exported RSYNC_SSL_TYPE environment variable to make its use the default.
113
114 ## BUGS
115
116 Please report bugs! See the web site at <https://rsync.samba.org/>.
117
118 ## VERSION
119
120 This man page is current for version @VERSION@ of rsync.
121
122 ## CREDITS
123
124 Rsync is distributed under the GNU General Public License.  See the file
125 [COPYING](COPYING) for details.
126
127 A web site is available at <https://rsync.samba.org/>.  The site includes an
128 FAQ-O-Matic which may cover questions unanswered by this manual page.
129
130 ## AUTHOR
131
132 This manpage was written by Wayne Davison.
133
134 Mailing lists for support and development are available at
135 <https://lists.samba.org/>.