| 1 |
.TH "rsync-ssl" "1" "20 May 2026" "rsync-ssl from rsync 3.4.3" "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. |
| 66 |
.IP "\fBRSYNC_SSL_OPENSSL\fP" |
| 67 |
Specifies the openssl executable to run when the connection type is set to |
| 68 |
openssl. If unspecified, the $PATH is searched for "openssl". |
| 69 |
.IP "\fBRSYNC_SSL_GNUTLS\fP" |
| 70 |
Specifies the gnutls-cli executable to run when the connection type is set |
| 71 |
to gnutls. If unspecified, the $PATH is searched for "gnutls-cli". |
| 72 |
.IP "\fBRSYNC_SSL_STUNNEL\fP" |
| 73 |
Specifies the stunnel executable to run when the connection type is set to |
| 74 |
stunnel. If unspecified, the $PATH is searched first for "stunnel4" and |
| 75 |
then for "stunnel". |
| 76 |
.P |
| 77 |
.SH "EXAMPLES" |
| 78 |
.RS 4 |
| 79 |
.P |
| 80 |
.nf |
| 81 |
rsync-ssl -aiv example.com::mod/ dest |
| 82 |
.fi |
| 83 |
.RE |
| 84 |
.RS 4 |
| 85 |
.P |
| 86 |
.nf |
| 87 |
rsync-ssl --type=openssl -aiv example.com::mod/ dest |
| 88 |
.fi |
| 89 |
.RE |
| 90 |
.RS 4 |
| 91 |
.P |
| 92 |
.nf |
| 93 |
rsync-ssl -aiv --port 9874 example.com::mod/ dest |
| 94 |
.fi |
| 95 |
.RE |
| 96 |
.RS 4 |
| 97 |
.P |
| 98 |
.nf |
| 99 |
rsync-ssl -aiv rsync://example.com:9874/mod/ dest |
| 100 |
.fi |
| 101 |
.RE |
| 102 |
.P |
| 103 |
.SH "THE SERVER SIDE" |
| 104 |
.P |
| 105 |
For help setting up an SSL/TLS supporting rsync, see the instructions in |
| 106 |
rsyncd.conf. |
| 107 |
.P |
| 108 |
.SH "SEE ALSO" |
| 109 |
.P |
| 110 |
\fBrsync\fP(1), \fBrsyncd.conf\fP(5) |
| 111 |
.P |
| 112 |
.SH "CAVEATS" |
| 113 |
.P |
| 114 |
Note that using an stunnel connection requires at least version 4 of stunnel, |
| 115 |
which should be the case on modern systems. Also, it does not verify a |
| 116 |
connection against the CA certificate collection, so it only encrypts the |
| 117 |
connection without any cert validation unless you have specified the |
| 118 |
certificate environment options. |
| 119 |
.P |
| 120 |
This script also supports a \fB\-\-type=gnutls\fP option, but at the time of this |
| 121 |
release the gnutls-cli command was dropping output, making it unusable. If |
| 122 |
that bug has been fixed in your version, feel free to put gnutls into an |
| 123 |
exported RSYNC_SSL_TYPE environment variable to make its use the default. |
| 124 |
.P |
| 125 |
.SH "BUGS" |
| 126 |
.P |
| 127 |
Please report bugs! See the web site at |
| 128 |
.UR https://rsync.samba.org/ |
| 129 |
.UE . |
| 130 |
.P |
| 131 |
.SH "VERSION" |
| 132 |
.P |
| 133 |
This manpage is current for version 3.4.3 of rsync. |
| 134 |
.P |
| 135 |
.SH "CREDITS" |
| 136 |
.P |
| 137 |
Rsync is distributed under the GNU General Public License. See the file |
| 138 |
COPYING for details. |
| 139 |
.P |
| 140 |
A web site is available at |
| 141 |
.UR https://rsync.samba.org/ |
| 142 |
.UE . |
| 143 |
The site includes an |
| 144 |
FAQ-O-Matic which may cover questions unanswered by this manual page. |
| 145 |
.P |
| 146 |
.SH "AUTHOR" |
| 147 |
.P |
| 148 |
This manpage was written by Wayne Davison. |
| 149 |
.P |
| 150 |
Mailing lists for support and development are available at |
| 151 |
.UR https://lists.samba.org/ |
| 152 |
.UE . |