Debian Codegraph @

rsync-ssl.1

raw
1 .TH "rsync-ssl" "1" "13 Aug 2026" "rsync-ssl from rsync 3.5.0" "User Commands"
2 .\" prefix=/usr
3 .P
4 .SH "NAME"
5 .P
6 rsync-ssl \- a helper script for connecting to an ssl rsync daemon
7 .P
8 .SH "SYNOPSIS"
9 .P
10 .nf
11 rsync-ssl [--type=SSL_TYPE] RSYNC_ARGS
12 .fi
13 .P
14 The online version of this manpage (that includes cross-linking of topics)
15 is available at
16 .UR https://download.samba.org/pub/rsync/rsync-ssl.1
17 .UE .
18 .P
19 .SH "DESCRIPTION"
20 .P
21 The rsync-ssl script helps you to run an rsync copy to/from an rsync daemon
22 that requires ssl connections.
23 .P
24 The script requires that you specify an rsync-daemon arg in the style of either
25 \fBhostname::\fP (with 2 colons) or \fBrsync://hostname/\fP. The default port used for
26 connecting is 874 (one higher than the normal 873) unless overridden in the
27 environment. You can specify an overriding port via \fB\-\-port\fP or by including
28 it in the normal spot in the URL format, though both of those require your
29 rsync version to be at least 3.2.0.
30 .P
31 .SH "OPTIONS"
32 .P
33 If the \fBfirst\fP arg is a \fB\-\-type=SSL_TYPE\fP option, the script will only use
34 that particular program to open an ssl connection instead of trying to find an
35 openssl or stunnel executable via a simple heuristic (assuming that the
36 \fBRSYNC_SSL_TYPE\fP environment variable is not set as well\ \-\- see below). This
37 option must specify one of \fBopenssl\fP or \fBstunnel\fP. The equal sign is
38 required for this particular option.
39 .P
40 All the other options are passed through to the rsync command, so consult the
41 \fBrsync\fP(1) manpage for more information on how it works.
42 .P
43 .SH "ENVIRONMENT VARIABLES"
44 .P
45 The ssl helper scripts are affected by the following environment variables:
46 .P
47 .IP "\fBRSYNC_SSL_TYPE\fP"
48 Specifies the program type that should be used to open the ssl connection.
49 It must be one of \fBopenssl\fP or \fBstunnel\fP. The \fB\-\-type=SSL_TYPE\fP option
50 overrides this, when specified.
51 .IP "\fBRSYNC_SSL_PORT\fP"
52 If specified, the value is the port number that is used as the default when
53 the user does not specify a port in their rsync command. When not
54 specified, the default port number is 874. (Note that older rsync versions
55 (prior to 3.2.0) did not communicate an overriding port number value to the
56 helper script.)
57 .IP "\fBRSYNC_SSL_CERT\fP"
58 If specified, the value is a filename that contains a certificate to use
59 for the connection.
60 .IP "\fBRSYNC_SSL_KEY\fP"
61 If specified, the value is a filename that contains a key for the provided
62 certificate to use for the connection.
63 .IP "\fBRSYNC_SSL_CA_CERT\fP"
64 If specified, the value is a filename that contains a certificate authority
65 certificate that is used to validate the connection. When set, the server
66 certificate is verified against this CA \fBand\fP its name is checked against
67 the host you are connecting to (the chain and the identity), for all of the
68 openssl, gnutls, and stunnel backends. Set it to an empty string to disable
69 certificate validation entirely (an encrypt-only connection).
70 .IP "\fBRSYNC_SSL_ALLOW_INSECURE_STUNNEL\fP"
71 Set to \fB1\fP to allow the stunnel backend to run without a CA certificate (and
72 thus with no server-certificate validation at all). Without this, stunnel
73 mode refuses to start unless \fBRSYNC_SSL_CA_CERT\fP is set, since an unvalidated
74 TLS connection can be silently man-in-the-middled.
75 .IP "\fBRSYNC_SSL_SKIP_HOSTNAME_CHECK\fP"
76 Set to \fB1\fP to verify the certificate \fBchain\fP but skip the \fBhostname\fP
77 (identity) check, for the openssl and stunnel backends. Use this only when
78 the server certificate legitimately cannot match the host you connect to\ \-\-
79 for example connecting by bare IP address, or to a server whose internal-CA
80 certificate carries a different name. The CA chain is still validated, so
81 this is much narrower than disabling validation with an empty
82 \fBRSYNC_SSL_CA_CERT\fP.
83 .IP "\fBRSYNC_SSL_OPENSSL\fP"
84 Specifies the openssl executable to run when the connection type is set to
85 openssl. If unspecified, the $PATH is searched for "openssl".
86 .IP "\fBRSYNC_SSL_GNUTLS\fP"
87 Specifies the gnutls-cli executable to run when the connection type is set
88 to gnutls. If unspecified, the $PATH is searched for "gnutls-cli".
89 .IP "\fBRSYNC_SSL_STUNNEL\fP"
90 Specifies the stunnel executable to run when the connection type is set to
91 stunnel. If unspecified, the $PATH is searched first for "stunnel4" and
92 then for "stunnel".
93 .P
94 .SH "EXAMPLES"
95 .RS 4
96 .P
97 .nf
98 rsync-ssl -aiv example.com::mod/ dest
99 .fi
100 .RE
101 .RS 4
102 .P
103 .nf
104 rsync-ssl --type=openssl -aiv example.com::mod/ dest
105 .fi
106 .RE
107 .RS 4
108 .P
109 .nf
110 rsync-ssl -aiv --port 9874 example.com::mod/ dest
111 .fi
112 .RE
113 .RS 4
114 .P
115 .nf
116 rsync-ssl -aiv rsync://example.com:9874/mod/ dest
117 .fi
118 .RE
119 .P
120 .SH "THE SERVER SIDE"
121 .P
122 For help setting up an SSL/TLS supporting rsync, see the instructions in
123 rsyncd.conf.
124 .P
125 .SH "SEE ALSO"
126 .P
127 \fBrsync\fP(1), \fBrsyncd.conf\fP(5)
128 .P
129 .SH "CAVEATS"
130 .P
131 Note that using an stunnel connection requires at least version 4 of stunnel,
132 which should be the case on modern systems. Also, it does not verify a
133 connection against the CA certificate collection, so it only encrypts the
134 connection without any cert validation unless you have specified the
135 certificate environment options.
136 .P
137 This script also supports a \fB\-\-type=gnutls\fP option, but at the time of this
138 release the gnutls-cli command was dropping output, making it unusable. If
139 that bug has been fixed in your version, feel free to put gnutls into an
140 exported RSYNC_SSL_TYPE environment variable to make its use the default.
141 .P
142 .SH "BUGS"
143 .P
144 Please report bugs! See the web site at
145 .UR https://rsync.samba.org/
146 .UE .
147 .P
148 .SH "VERSION"
149 .P
150 This manpage is current for version 3.5.0 of rsync.
151 .P
152 .SH "CREDITS"
153 .P
154 Rsync is distributed under the GNU General Public License. See the file
155 COPYING for details.
156 .P
157 A web site is available at
158 .UR https://rsync.samba.org/
159 .UE .
160 The site includes an
161 FAQ-O-Matic which may cover questions unanswered by this manual page.
162 .P
163 .SH "AUTHOR"
164 .P
165 This manpage was written by Wayne Davison.
166 .P
167 Mailing lists for support and development are available at
168 .UR https://lists.samba.org/
169 .UE .