| 1 | <html><head> |
| 2 | <title>rsync-ssl(1) manpage</title> |
| 3 | <meta charset="UTF-8"/> |
| 4 | <link href="https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Mono&display=swap" rel="stylesheet"> |
| 5 | <style> |
| 6 | body { |
| 7 | max-width: 50em; |
| 8 | margin: auto; |
| 9 | } |
| 10 | body, b, strong, u { |
| 11 | font-family: 'Roboto', sans-serif; |
| 12 | } |
| 13 | a.tgt { font-face: symbol; font-weight: 400; font-size: 70%; visibility: hidden; text-decoration: none; color: #ddd; padding: 0 4px; border: 0; } |
| 14 | a.tgt:after { content: '🔗'; } |
| 15 | a.tgt:hover { color: #444; background-color: #eaeaea; } |
| 16 | h1:hover > a.tgt, h2:hover > a.tgt, h3:hover > a.tgt, dt:hover > a.tgt { visibility: visible; } |
| 17 | code { |
| 18 | font-family: 'Roboto Mono', monospace; |
| 19 | font-weight: bold; |
| 20 | white-space: pre; |
| 21 | } |
| 22 | pre code { |
| 23 | display: block; |
| 24 | font-weight: normal; |
| 25 | } |
| 26 | blockquote pre code { |
| 27 | background: #f1f1f1; |
| 28 | } |
| 29 | dd p:first-of-type { |
| 30 | margin-block-start: 0em; |
| 31 | } |
| 32 | </style> |
| 33 | </head><body> |
| 34 | <h2 id="NAME">NAME<a href="#NAME" class="tgt"></a></h2> |
| 35 | <p>rsync-ssl -⁠ a helper script for connecting to an ssl rsync daemon</p> |
| 36 | <h2 id="SYNOPSIS">SYNOPSIS<a href="#SYNOPSIS" class="tgt"></a></h2> |
| 37 | <pre><code>rsync-ssl [--type=SSL_TYPE] RSYNC_ARGS |
| 38 | </code></pre> |
| 39 | <p>The online version of this manpage (that includes cross-linking of topics) |
| 40 | is available at <a href="https://download.samba.org/pub/rsync/rsync-ssl.1">https://download.samba.org/pub/rsync/rsync-ssl.1</a>.</p> |
| 41 | <h2 id="DESCRIPTION">DESCRIPTION<a href="#DESCRIPTION" class="tgt"></a></h2> |
| 42 | <p>The rsync-ssl script helps you to run an rsync copy to/from an rsync daemon |
| 43 | that requires ssl connections.</p> |
| 44 | <p>The script requires that you specify an rsync-daemon arg in the style of either |
| 45 | <code>hostname::</code> (with 2 colons) or <code>rsync://hostname/</code>. The default port used for |
| 46 | connecting is 874 (one higher than the normal 873) unless overridden in the |
| 47 | environment. You can specify an overriding port via <code>--port</code> or by including |
| 48 | it in the normal spot in the URL format, though both of those require your |
| 49 | rsync version to be at least 3.2.0.</p> |
| 50 | <h2 id="OPTIONS">OPTIONS<a href="#OPTIONS" class="tgt"></a></h2> |
| 51 | <p>If the <strong>first</strong> arg is a <code>--type=SSL_TYPE</code> option, the script will only use |
| 52 | that particular program to open an ssl connection instead of trying to find an |
| 53 | openssl or stunnel executable via a simple heuristic (assuming that the |
| 54 | <code>RSYNC_SSL_TYPE</code> environment variable is not set as well -⁠-⁠ see below). This |
| 55 | option must specify one of <code>openssl</code> or <code>stunnel</code>. The equal sign is |
| 56 | required for this particular option.</p> |
| 57 | <p>All the other options are passed through to the rsync command, so consult the |
| 58 | <strong>rsync</strong>(1) manpage for more information on how it works.</p> |
| 59 | <h2 id="ENVIRONMENT_VARIABLES">ENVIRONMENT VARIABLES<a href="#ENVIRONMENT_VARIABLES" class="tgt"></a></h2> |
| 60 | <p>The ssl helper scripts are affected by the following environment variables:</p> |
| 61 | <dl> |
| 62 | |
| 63 | <dt id="RSYNC_SSL_TYPE"><code>RSYNC_SSL_TYPE</code><a href="#RSYNC_SSL_TYPE" class="tgt"></a></dt><dd> |
| 64 | <p>Specifies the program type that should be used to open the ssl connection. |
| 65 | It must be one of <code>openssl</code> or <code>stunnel</code>. The <code>--type=SSL_TYPE</code> option |
| 66 | overrides this, when specified.</p> |
| 67 | </dd> |
| 68 | |
| 69 | <dt id="RSYNC_SSL_PORT"><code>RSYNC_SSL_PORT</code><a href="#RSYNC_SSL_PORT" class="tgt"></a></dt><dd> |
| 70 | <p>If specified, the value is the port number that is used as the default when |
| 71 | the user does not specify a port in their rsync command. When not |
| 72 | specified, the default port number is 874. (Note that older rsync versions |
| 73 | (prior to 3.2.0) did not communicate an overriding port number value to the |
| 74 | helper script.)</p> |
| 75 | </dd> |
| 76 | |
| 77 | <dt id="RSYNC_SSL_CERT"><code>RSYNC_SSL_CERT</code><a href="#RSYNC_SSL_CERT" class="tgt"></a></dt><dd> |
| 78 | <p>If specified, the value is a filename that contains a certificate to use |
| 79 | for the connection.</p> |
| 80 | </dd> |
| 81 | |
| 82 | <dt id="RSYNC_SSL_KEY"><code>RSYNC_SSL_KEY</code><a href="#RSYNC_SSL_KEY" class="tgt"></a></dt><dd> |
| 83 | <p>If specified, the value is a filename that contains a key for the provided |
| 84 | certificate to use for the connection.</p> |
| 85 | </dd> |
| 86 | |
| 87 | <dt id="RSYNC_SSL_CA_CERT"><code>RSYNC_SSL_CA_CERT</code><a href="#RSYNC_SSL_CA_CERT" class="tgt"></a></dt><dd> |
| 88 | <p>If specified, the value is a filename that contains a certificate authority |
| 89 | certificate that is used to validate the connection. When set, the server |
| 90 | certificate is verified against this CA <strong>and</strong> its name is checked against |
| 91 | the host you are connecting to (the chain and the identity), for all of the |
| 92 | openssl, gnutls, and stunnel backends. Set it to an empty string to disable |
| 93 | certificate validation entirely (an encrypt-only connection).</p> |
| 94 | </dd> |
| 95 | |
| 96 | <dt id="RSYNC_SSL_ALLOW_INSECURE_STUNNEL"><code>RSYNC_SSL_ALLOW_INSECURE_STUNNEL</code><a href="#RSYNC_SSL_ALLOW_INSECURE_STUNNEL" class="tgt"></a></dt><dd> |
| 97 | <p>Set to <code>1</code> to allow the stunnel backend to run without a CA certificate (and |
| 98 | thus with no server-certificate validation at all). Without this, stunnel |
| 99 | mode refuses to start unless <code>RSYNC_SSL_CA_CERT</code> is set, since an unvalidated |
| 100 | TLS connection can be silently man-in-the-middled.</p> |
| 101 | </dd> |
| 102 | |
| 103 | <dt id="RSYNC_SSL_SKIP_HOSTNAME_CHECK"><code>RSYNC_SSL_SKIP_HOSTNAME_CHECK</code><a href="#RSYNC_SSL_SKIP_HOSTNAME_CHECK" class="tgt"></a></dt><dd> |
| 104 | <p>Set to <code>1</code> to verify the certificate <strong>chain</strong> but skip the <strong>hostname</strong> |
| 105 | (identity) check, for the openssl and stunnel backends. Use this only when |
| 106 | the server certificate legitimately cannot match the host you connect to -⁠-⁠ |
| 107 | for example connecting by bare IP address, or to a server whose internal-CA |
| 108 | certificate carries a different name. The CA chain is still validated, so |
| 109 | this is much narrower than disabling validation with an empty |
| 110 | <code>RSYNC_SSL_CA_CERT</code>.</p> |
| 111 | </dd> |
| 112 | |
| 113 | <dt id="RSYNC_SSL_OPENSSL"><code>RSYNC_SSL_OPENSSL</code><a href="#RSYNC_SSL_OPENSSL" class="tgt"></a></dt><dd> |
| 114 | <p>Specifies the openssl executable to run when the connection type is set to |
| 115 | openssl. If unspecified, the $PATH is searched for "openssl".</p> |
| 116 | </dd> |
| 117 | |
| 118 | <dt id="RSYNC_SSL_GNUTLS"><code>RSYNC_SSL_GNUTLS</code><a href="#RSYNC_SSL_GNUTLS" class="tgt"></a></dt><dd> |
| 119 | <p>Specifies the gnutls-cli executable to run when the connection type is set |
| 120 | to gnutls. If unspecified, the $PATH is searched for "gnutls-cli".</p> |
| 121 | </dd> |
| 122 | |
| 123 | <dt id="RSYNC_SSL_STUNNEL"><code>RSYNC_SSL_STUNNEL</code><a href="#RSYNC_SSL_STUNNEL" class="tgt"></a></dt><dd> |
| 124 | <p>Specifies the stunnel executable to run when the connection type is set to |
| 125 | stunnel. If unspecified, the $PATH is searched first for "stunnel4" and |
| 126 | then for "stunnel".</p> |
| 127 | </dd> |
| 128 | </dl> |
| 129 | <h2 id="EXAMPLES">EXAMPLES<a href="#EXAMPLES" class="tgt"></a></h2> |
| 130 | <blockquote> |
| 131 | <pre><code>rsync-ssl -aiv example.com::mod/ dest |
| 132 | </code></pre> |
| 133 | </blockquote> |
| 134 | <blockquote> |
| 135 | <pre><code>rsync-ssl --type=openssl -aiv example.com::mod/ dest |
| 136 | </code></pre> |
| 137 | </blockquote> |
| 138 | <blockquote> |
| 139 | <pre><code>rsync-ssl -aiv --port 9874 example.com::mod/ dest |
| 140 | </code></pre> |
| 141 | </blockquote> |
| 142 | <blockquote> |
| 143 | <pre><code>rsync-ssl -aiv rsync://example.com:9874/mod/ dest |
| 144 | </code></pre> |
| 145 | </blockquote> |
| 146 | <h2 id="THE_SERVER_SIDE">THE SERVER SIDE<a href="#THE_SERVER_SIDE" class="tgt"></a></h2> |
| 147 | <p>For help setting up an SSL/TLS supporting rsync, see the <a href="rsyncd.conf.5#SSL_TLS_Daemon_Setup">instructions in |
| 148 | rsyncd.conf</a>.</p> |
| 149 | <h2 id="SEE_ALSO">SEE ALSO<a href="#SEE_ALSO" class="tgt"></a></h2> |
| 150 | <p><a href="rsync.1"><strong>rsync</strong>(1)</a>, <a href="rsyncd.conf.5"><strong>rsyncd.conf</strong>(5)</a></p> |
| 151 | <h2 id="CAVEATS">CAVEATS<a href="#CAVEATS" class="tgt"></a></h2> |
| 152 | <p>Note that using an stunnel connection requires at least version 4 of stunnel, |
| 153 | which should be the case on modern systems. Also, it does not verify a |
| 154 | connection against the CA certificate collection, so it only encrypts the |
| 155 | connection without any cert validation unless you have specified the |
| 156 | certificate environment options.</p> |
| 157 | <p>This script also supports a <code>--type=gnutls</code> option, but at the time of this |
| 158 | release the gnutls-cli command was dropping output, making it unusable. If |
| 159 | that bug has been fixed in your version, feel free to put gnutls into an |
| 160 | exported RSYNC_SSL_TYPE environment variable to make its use the default.</p> |
| 161 | <h2 id="BUGS">BUGS<a href="#BUGS" class="tgt"></a></h2> |
| 162 | <p>Please report bugs! See the web site at <a href="https://rsync.samba.org/">https://rsync.samba.org/</a>.</p> |
| 163 | <h2 id="VERSION">VERSION<a href="#VERSION" class="tgt"></a></h2> |
| 164 | <p>This manpage is current for version 3.5.0 of rsync.</p> |
| 165 | <h2 id="CREDITS">CREDITS<a href="#CREDITS" class="tgt"></a></h2> |
| 166 | <p>Rsync is distributed under the GNU General Public License. See the file |
| 167 | <a href="COPYING">COPYING</a> for details.</p> |
| 168 | <p>A web site is available at <a href="https://rsync.samba.org/">https://rsync.samba.org/</a>. The site includes an |
| 169 | FAQ-O-Matic which may cover questions unanswered by this manual page.</p> |
| 170 | <h2 id="AUTHOR">AUTHOR<a href="#AUTHOR" class="tgt"></a></h2> |
| 171 | <p>This manpage was written by Wayne Davison.</p> |
| 172 | <p>Mailing lists for support and development are available at |
| 173 | <a href="https://lists.samba.org/">https://lists.samba.org/</a>.</p> |
| 174 | <div style="float: right"><p><i>13 Aug 2026</i></p></div> |
| 175 | </body></html> |