CINXE.COM

ssh(1) - OpenBSD manual pages

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="/mandoc.css" type="text/css" media="all"> <title>ssh(1) - OpenBSD manual pages</title> </head> <body> <header> <section> <h1><a href="https://www.openbsd.org/">OpenBSD</a> manual page server</h1> </section> <form role="search" action="/" method="get" autocomplete="off" autocapitalize="none"> <fieldset> <legend>Manual Page Search Parameters</legend> <label>Search query: <input type="search" name="query" value="ssh" size="40"> </label> <button type="submit" name="apropos" value="0">man</button> <button type="submit" name="apropos" value="1">apropos</button> <br/> <select name="sec" aria-label="Manual section"> <option value="0">All Sections</option> <option value="1" selected="selected">1 - General Commands</option> <option value="2">2 - System Calls</option> <option value="3">3 - Library Functions</option> <option value="3p">3p - Perl Library</option> <option value="4">4 - Device Drivers</option> <option value="5">5 - File Formats</option> <option value="6">6 - Games</option> <option value="7">7 - Miscellaneous Information</option> <option value="8">8 - System Manager's Manual</option> <option value="9">9 - Kernel Developer's Manual</option> </select> <select name="arch" aria-label="CPU architecture"> <option value="default" selected="selected">All Architectures</option> <option>amd64</option> <option>alpha</option> <option>armv7</option> <option>arm64</option> <option>hppa</option> <option>i386</option> <option>landisk</option> <option>loongson</option> <option>luna88k</option> <option>macppc</option> <option>mips64</option> <option>octeon</option> <option>powerpc64</option> <option>riscv64</option> <option>sparc64</option> <option>amiga</option> <option>arc</option> <option>armish</option> <option>arm32</option> <option>atari</option> <option>aviion</option> <option>beagle</option> <option>cats</option> <option>hppa64</option> <option>hp300</option> <option>ia64</option> <option>mac68k</option> <option>mvme68k</option> <option>mvme88k</option> <option>mvmeppc</option> <option>palm</option> <option>pc532</option> <option>pegasos</option> <option>pmax</option> <option>powerpc</option> <option>sgi</option> <option>socppc</option> <option>solbourne</option> <option>sparc</option> <option>sun3</option> <option>vax</option> <option>wgrisc</option> <option>x68k</option> <option>zaurus</option> </select> <select name="manpath" aria-label="Manual path"> <option selected="selected">OpenBSD-current</option> <option>OpenBSD-7.6</option> <option>OpenBSD-7.5</option> <option>OpenBSD-7.4</option> <option>OpenBSD-7.3</option> <option>OpenBSD-7.2</option> <option>OpenBSD-7.1</option> <option>OpenBSD-7.0</option> <option>OpenBSD-6.9</option> <option>OpenBSD-6.8</option> <option>OpenBSD-6.7</option> <option>OpenBSD-6.6</option> <option>OpenBSD-6.5</option> <option>OpenBSD-6.4</option> <option>OpenBSD-6.3</option> <option>OpenBSD-6.2</option> <option>OpenBSD-6.1</option> <option>OpenBSD-6.0</option> <option>OpenBSD-5.9</option> <option>OpenBSD-5.8</option> <option>OpenBSD-5.7</option> <option>OpenBSD-5.6</option> <option>OpenBSD-5.5</option> <option>OpenBSD-5.4</option> <option>OpenBSD-5.3</option> <option>OpenBSD-5.2</option> <option>OpenBSD-5.1</option> <option>OpenBSD-5.0</option> <option>OpenBSD-4.9</option> <option>OpenBSD-4.8</option> <option>OpenBSD-4.7</option> <option>OpenBSD-4.6</option> <option>OpenBSD-4.5</option> <option>OpenBSD-4.4</option> <option>OpenBSD-4.3</option> <option>OpenBSD-4.2</option> <option>OpenBSD-4.1</option> <option>OpenBSD-4.0</option> <option>OpenBSD-3.9</option> <option>OpenBSD-3.8</option> <option>OpenBSD-3.7</option> <option>OpenBSD-3.6</option> <option>OpenBSD-3.5</option> <option>OpenBSD-3.4</option> <option>OpenBSD-3.3</option> <option>OpenBSD-3.2</option> <option>OpenBSD-3.1</option> <option>OpenBSD-3.0</option> <option>OpenBSD-2.9</option> <option>OpenBSD-2.8</option> <option>OpenBSD-2.7</option> <option>OpenBSD-2.6</option> <option>OpenBSD-2.5</option> <option>OpenBSD-2.4</option> <option>OpenBSD-2.3</option> <option>OpenBSD-2.2</option> </select> </fieldset> </form> </header> <hr> <div class="head" role="doc-pageheader" aria-label="Manual header line"><span class="head-ltitle">SSH(1)</span> <span class="head-vol">General Commands Manual</span> <span class="head-rtitle">SSH(1)</span></div> <main class="manual-text"> <section class="Sh"> <h2 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h2> <p class="Pp"><code class="Nm">ssh</code> &#x2014; <span class="Nd" role="doc-subtitle">OpenSSH remote login client</span></p> </section> <section class="Sh"> <h2 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h2> <table class="Nm"> <tr> <td><code class="Nm">ssh</code></td> <td>[<code class="Fl">-46AaCfGgKkMNnqsTtVvXxYy</code>] [<code class="Fl">-B</code> <var class="Ar">bind_interface</var>] [<code class="Fl">-b</code> <var class="Ar">bind_address</var>] [<code class="Fl">-c</code> <var class="Ar">cipher_spec</var>] [<code class="Fl">-D</code> [<var class="Ar">bind_address</var>:]<var class="Ar">port</var>] [<code class="Fl">-E</code> <var class="Ar">log_file</var>] [<code class="Fl">-e</code> <var class="Ar">escape_char</var>] [<code class="Fl">-F</code> <var class="Ar">configfile</var>] [<code class="Fl">-I</code> <var class="Ar">pkcs11</var>] [<code class="Fl">-i</code> <var class="Ar">identity_file</var>] [<code class="Fl">-J</code> <var class="Ar">destination</var>] [<code class="Fl">-L</code> <var class="Ar">address</var>] [<code class="Fl">-l</code> <var class="Ar">login_name</var>] [<code class="Fl">-m</code> <var class="Ar">mac_spec</var>] [<code class="Fl">-O</code> <var class="Ar">ctl_cmd</var>] [<code class="Fl">-o</code> <var class="Ar">option</var>] [<code class="Fl">-P</code> <var class="Ar">tag</var>] [<code class="Fl">-p</code> <var class="Ar">port</var>] [<code class="Fl">-R</code> <var class="Ar">address</var>] [<code class="Fl">-S</code> <var class="Ar">ctl_path</var>] [<code class="Fl">-W</code> <var class="Ar">host</var>:<var class="Ar">port</var>] [<code class="Fl">-w</code> <var class="Ar">local_tun</var>[:<var class="Ar">remote_tun</var>]] <var class="Ar">destination</var> [<var class="Ar">command</var> [<var class="Ar">argument ...</var>]]</td> </tr> </table> <br/> <table class="Nm"> <tr> <td><code class="Nm">ssh</code></td> <td>[<code class="Fl">-Q</code> <var class="Ar">query_option</var>]</td> </tr> </table> </section> <section class="Sh"> <h2 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h2> <p class="Pp"><code class="Nm">ssh</code> (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to provide secure encrypted communications between two untrusted hosts over an insecure network. X11 connections, arbitrary TCP ports and <span class="Ux">UNIX</span>-domain sockets can also be forwarded over the secure channel.</p> <p class="Pp"><code class="Nm">ssh</code> connects and logs into the specified <var class="Ar">destination</var>, which may be specified as either [user@]hostname or a URI of the form <span class="No">ssh://</span>[user@]hostname[:port]. The user must prove their identity to the remote machine using one of several methods (see below).</p> <p class="Pp">If a <var class="Ar">command</var> is specified, it will be executed on the remote host instead of a login shell. A complete command line may be specified as <var class="Ar">command</var>, or it may have additional arguments. If supplied, the arguments will be appended to the command, separated by spaces, before it is sent to the server to be executed.</p> <p class="Pp">The options are as follows:</p> <p class="Pp"></p> <dl class="Bl-tag Bl-compact"> <dt id="4"><a class="permalink" href="#4"><code class="Fl">-4</code></a></dt> <dd>Forces <code class="Nm">ssh</code> to use IPv4 addresses only. <p class="Pp"></p> </dd> <dt id="6"><a class="permalink" href="#6"><code class="Fl">-6</code></a></dt> <dd>Forces <code class="Nm">ssh</code> to use IPv6 addresses only. <p class="Pp"></p> </dd> <dt id="A"><a class="permalink" href="#A"><code class="Fl">-A</code></a></dt> <dd>Enables forwarding of connections from an authentication agent such as <a class="Xr" href="/ssh-agent.1" aria-label="ssh-agent, section 1">ssh-agent(1)</a>. This can also be specified on a per-host basis in a configuration file. <p class="Pp">Agent forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the agent's <span class="Ux">UNIX</span>-domain socket) can access the local agent through the forwarded connection. An attacker cannot obtain key material from the agent, however they can perform operations on the keys that enable them to authenticate using the identities loaded into the agent. A safer alternative may be to use a jump host (see <code class="Fl">-J</code>).</p> <p class="Pp"></p> </dd> <dt id="a"><a class="permalink" href="#a"><code class="Fl">-a</code></a></dt> <dd>Disables forwarding of the authentication agent connection. <p class="Pp"></p> </dd> <dt id="B"><a class="permalink" href="#B"><code class="Fl">-B</code></a> <var class="Ar">bind_interface</var></dt> <dd>Bind to the address of <var class="Ar">bind_interface</var> before attempting to connect to the destination host. This is only useful on systems with more than one address. <p class="Pp"></p> </dd> <dt id="b"><a class="permalink" href="#b"><code class="Fl">-b</code></a> <var class="Ar">bind_address</var></dt> <dd>Use <var class="Ar">bind_address</var> on the local machine as the source address of the connection. Only useful on systems with more than one address. <p class="Pp"></p> </dd> <dt id="C"><a class="permalink" href="#C"><code class="Fl">-C</code></a></dt> <dd>Requests compression of all data (including stdin, stdout, stderr, and data for forwarded X11, TCP and <span class="Ux">UNIX</span>-domain connections). The compression algorithm is the same used by <a class="Xr" href="/gzip.1" aria-label="gzip, section 1">gzip(1)</a>. Compression is desirable on modem lines and other slow connections, but will only slow down things on fast networks. The default value can be set on a host-by-host basis in the configuration files; see the <code class="Cm">Compression</code> option in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a>. <p class="Pp"></p> </dd> <dt id="c"><a class="permalink" href="#c"><code class="Fl">-c</code></a> <var class="Ar">cipher_spec</var></dt> <dd>Selects the cipher specification for encrypting the session. <var class="Ar">cipher_spec</var> is a comma-separated list of ciphers listed in order of preference. See the <code class="Cm">Ciphers</code> keyword in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for more information. <p class="Pp"></p> </dd> <dt id="D"><a class="permalink" href="#D"><code class="Fl">-D</code></a> [<var class="Ar">bind_address</var>:]<var class="Ar">port</var></dt> <dd>Specifies a local &#x201C;dynamic&#x201D; application-level port forwarding. This works by allocating a socket to listen to <var class="Ar">port</var> on the local side, optionally bound to the specified <var class="Ar">bind_address</var>. Whenever a connection is made to this port, the connection is forwarded over the secure channel, and the application protocol is then used to determine where to connect to from the remote machine. Currently the SOCKS4 and SOCKS5 protocols are supported, and <code class="Nm">ssh</code> will act as a SOCKS server. Only root can forward privileged ports. Dynamic port forwardings can also be specified in the configuration file. <p class="Pp">IPv6 addresses can be specified by enclosing the address in square brackets. Only the superuser can forward privileged ports. By default, the local port is bound in accordance with the <code class="Cm">GatewayPorts</code> setting. However, an explicit <var class="Ar">bind_address</var> may be used to bind the connection to a specific address. The <var class="Ar">bind_address</var> of &#x201C;localhost&#x201D; indicates that the listening port be bound for local use only, while an empty address or &#x2018;*&#x2019; indicates that the port should be available from all interfaces.</p> <p class="Pp"></p> </dd> <dt id="E"><a class="permalink" href="#E"><code class="Fl">-E</code></a> <var class="Ar">log_file</var></dt> <dd>Append debug logs to <var class="Ar">log_file</var> instead of standard error. <p class="Pp"></p> </dd> <dt id="e"><a class="permalink" href="#e"><code class="Fl">-e</code></a> <var class="Ar">escape_char</var></dt> <dd>Sets the escape character for sessions with a pty (default: &#x2018;<code class="Li">~</code>&#x2019;). The escape character is only recognized at the beginning of a line. The escape character followed by a dot (&#x2018;<code class="Li">.</code>&#x2019;) closes the connection; followed by control-Z suspends the connection; and followed by itself sends the escape character once. Setting the character to &#x201C;none&#x201D; disables any escapes and makes the session fully transparent. <p class="Pp"></p> </dd> <dt id="F"><a class="permalink" href="#F"><code class="Fl">-F</code></a> <var class="Ar">configfile</var></dt> <dd>Specifies an alternative per-user configuration file. If a configuration file is given on the command line, the system-wide configuration file (<span class="Pa">/etc/ssh/ssh_config</span>) will be ignored. The default for the per-user configuration file is <span class="Pa">~/.ssh/config</span>. If set to &#x201C;none&#x201D;, no configuration files will be read. <p class="Pp"></p> </dd> <dt id="f"><a class="permalink" href="#f"><code class="Fl">-f</code></a></dt> <dd>Requests <code class="Nm">ssh</code> to go to background just before command execution. This is useful if <code class="Nm">ssh</code> is going to ask for passwords or passphrases, but the user wants it in the background. This implies <code class="Fl">-n</code>. The recommended way to start X11 programs at a remote site is with something like <code class="Ic">ssh -f host xterm</code>. <p class="Pp">If the <code class="Cm">ExitOnForwardFailure</code> configuration option is set to &#x201C;yes&#x201D;, then a client started with <code class="Fl">-f</code> will wait for all remote port forwards to be successfully established before placing itself in the background. Refer to the description of <code class="Cm">ForkAfterAuthentication</code> in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for details.</p> <p class="Pp"></p> </dd> <dt id="G"><a class="permalink" href="#G"><code class="Fl">-G</code></a></dt> <dd>Causes <code class="Nm">ssh</code> to print its configuration after evaluating <code class="Cm">Host</code> and <code class="Cm">Match</code> blocks and exit. <p class="Pp"></p> </dd> <dt id="g"><a class="permalink" href="#g"><code class="Fl">-g</code></a></dt> <dd>Allows remote hosts to connect to local forwarded ports. If used on a multiplexed connection, then this option must be specified on the master process. <p class="Pp"></p> </dd> <dt id="I"><a class="permalink" href="#I"><code class="Fl">-I</code></a> <var class="Ar">pkcs11</var></dt> <dd>Specify the PKCS#11 shared library <code class="Nm">ssh</code> should use to communicate with a PKCS#11 token providing keys for user authentication. <p class="Pp"></p> </dd> <dt id="i"><a class="permalink" href="#i"><code class="Fl">-i</code></a> <var class="Ar">identity_file</var></dt> <dd>Selects a file from which the identity (private key) for public key authentication is read. You can also specify a public key file to use the corresponding private key that is loaded in <a class="Xr" href="/ssh-agent.1" aria-label="ssh-agent, section 1">ssh-agent(1)</a> when the private key file is not present locally. The default is <span class="Pa">~/.ssh/id_rsa</span>, <span class="Pa">~/.ssh/id_ecdsa</span>, <span class="Pa">~/.ssh/id_ecdsa_sk</span>, <span class="Pa">~/.ssh/id_ed25519</span> and <span class="Pa">~/.ssh/id_ed25519_sk</span>. Identity files may also be specified on a per-host basis in the configuration file. It is possible to have multiple <code class="Fl">-i</code> options (and multiple identities specified in configuration files). If no certificates have been explicitly specified by the <code class="Cm">CertificateFile</code> directive, <code class="Nm">ssh</code> will also try to load certificate information from the filename obtained by appending <span class="Pa">-cert.pub</span> to identity filenames. <p class="Pp"></p> </dd> <dt id="J"><a class="permalink" href="#J"><code class="Fl">-J</code></a> <var class="Ar">destination</var></dt> <dd>Connect to the target host by first making an <code class="Nm">ssh</code> connection to the jump host described by <var class="Ar">destination</var> and then establishing a TCP forwarding to the ultimate destination from there. Multiple jump hops may be specified separated by comma characters. IPv6 addresses can be specified by enclosing the address in square brackets. This is a shortcut to specify a <code class="Cm">ProxyJump</code> configuration directive. Note that configuration directives supplied on the command-line generally apply to the destination host and not any specified jump hosts. Use <span class="Pa">~/.ssh/config</span> to specify configuration for jump hosts. <p class="Pp"></p> </dd> <dt id="K"><a class="permalink" href="#K"><code class="Fl">-K</code></a></dt> <dd>Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI credentials to the server. <p class="Pp"></p> </dd> <dt id="k"><a class="permalink" href="#k"><code class="Fl">-k</code></a></dt> <dd>Disables forwarding (delegation) of GSSAPI credentials to the server. <p class="Pp"></p> </dd> <dt id="L"><a class="permalink" href="#L"><code class="Fl">-L</code></a> [<var class="Ar">bind_address</var>:]<var class="Ar">port</var>:<var class="Ar">host</var>:<var class="Ar">hostport</var></dt> <dd style="width: auto;">&#x00A0;</dd> <dt id="L~2"><a class="permalink" href="#L~2"><code class="Fl">-L</code></a> [<var class="Ar">bind_address</var>:]<var class="Ar">port</var>:<var class="Ar">remote_socket</var></dt> <dd style="width: auto;">&#x00A0;</dd> <dt id="L~3"><a class="permalink" href="#L~3"><code class="Fl">-L</code></a> <var class="Ar">local_socket</var>:<var class="Ar">host</var>:<var class="Ar">hostport</var></dt> <dd style="width: auto;">&#x00A0;</dd> <dt id="L~4"><a class="permalink" href="#L~4"><code class="Fl">-L</code></a> <var class="Ar">local_socket</var>:<var class="Ar">remote_socket</var></dt> <dd>Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port, or Unix socket, on the remote side. This works by allocating a socket to listen to either a TCP <var class="Ar">port</var> on the local side, optionally bound to the specified <var class="Ar">bind_address</var>, or to a Unix socket. Whenever a connection is made to the local port or socket, the connection is forwarded over the secure channel, and a connection is made to either <var class="Ar">host</var> port <var class="Ar">hostport</var>, or the Unix socket <var class="Ar">remote_socket</var>, from the remote machine. <p class="Pp">Port forwardings can also be specified in the configuration file. Only the superuser can forward privileged ports. IPv6 addresses can be specified by enclosing the address in square brackets.</p> <p class="Pp">By default, the local port is bound in accordance with the <code class="Cm">GatewayPorts</code> setting. However, an explicit <var class="Ar">bind_address</var> may be used to bind the connection to a specific address. The <var class="Ar">bind_address</var> of &#x201C;localhost&#x201D; indicates that the listening port be bound for local use only, while an empty address or &#x2018;*&#x2019; indicates that the port should be available from all interfaces.</p> <p class="Pp"></p> </dd> <dt id="l"><a class="permalink" href="#l"><code class="Fl">-l</code></a> <var class="Ar">login_name</var></dt> <dd>Specifies the user to log in as on the remote machine. This also may be specified on a per-host basis in the configuration file. <p class="Pp"></p> </dd> <dt id="M"><a class="permalink" href="#M"><code class="Fl">-M</code></a></dt> <dd>Places the <code class="Nm">ssh</code> client into &#x201C;master&#x201D; mode for connection sharing. Multiple <code class="Fl">-M</code> options places <code class="Nm">ssh</code> into &#x201C;master&#x201D; mode but with confirmation required using <a class="Xr" href="/ssh-askpass.1" aria-label="ssh-askpass, section 1">ssh-askpass(1)</a> before each operation that changes the multiplexing state (e.g. opening a new session). Refer to the description of <code class="Cm">ControlMaster</code> in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for details. <p class="Pp"></p> </dd> <dt id="m"><a class="permalink" href="#m"><code class="Fl">-m</code></a> <var class="Ar">mac_spec</var></dt> <dd>A comma-separated list of MAC (message authentication code) algorithms, specified in order of preference. See the <code class="Cm">MACs</code> keyword in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for more information. <p class="Pp"></p> </dd> <dt id="N"><a class="permalink" href="#N"><code class="Fl">-N</code></a></dt> <dd>Do not execute a remote command. This is useful for just forwarding ports. Refer to the description of <code class="Cm">SessionType</code> in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for details. <p class="Pp"></p> </dd> <dt id="n"><a class="permalink" href="#n"><code class="Fl">-n</code></a></dt> <dd>Redirects stdin from <span class="Pa">/dev/null</span> (actually, prevents reading from stdin). This must be used when <code class="Nm">ssh</code> is run in the background. A common trick is to use this to run X11 programs on a remote machine. For example, <code class="Ic">ssh -n shadows.cs.hut.fi emacs &amp;</code> will start an emacs on shadows.cs.hut.fi, and the X11 connection will be automatically forwarded over an encrypted channel. The <code class="Nm">ssh</code> program will be put in the background. (This does not work if <code class="Nm">ssh</code> needs to ask for a password or passphrase; see also the <code class="Fl">-f</code> option.) Refer to the description of <code class="Cm">StdinNull</code> in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for details. <p class="Pp"></p> </dd> <dt id="O"><a class="permalink" href="#O"><code class="Fl">-O</code></a> <var class="Ar">ctl_cmd</var></dt> <dd>Control an active connection multiplexing master process. When the <code class="Fl">-O</code> option is specified, the <var class="Ar">ctl_cmd</var> argument is interpreted and passed to the master process. Valid commands are: &#x201C;check&#x201D; (check that the master process is running), &#x201C;forward&#x201D; (request forwardings without command execution), &#x201C;cancel&#x201D; (cancel forwardings), &#x201C;proxy&#x201D; (connect to a running multiplexing master in proxy mode), &#x201C;exit&#x201D; (request the master to exit), and &#x201C;stop&#x201D; (request the master to stop accepting further multiplexing requests). <p class="Pp"></p> </dd> <dt id="o"><a class="permalink" href="#o"><code class="Fl">-o</code></a> <var class="Ar">option</var></dt> <dd>Can be used to give options in the format used in the configuration file. This is useful for specifying options for which there is no separate command-line flag. For full details of the options listed below, and their possible values, see <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a>. <p class="Pp"></p> <div class="Bd-indent"> <dl class="Bl-tag Bl-compact"> <dt>AddKeysToAgent</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>AddressFamily</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>BatchMode</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>BindAddress</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>CanonicalDomains</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>CanonicalizeFallbackLocal</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>CanonicalizeHostname</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>CanonicalizeMaxDots</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>CanonicalizePermittedCNAMEs</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>CASignatureAlgorithms</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>CertificateFile</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>CheckHostIP</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>Ciphers</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ClearAllForwardings</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>Compression</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ConnectionAttempts</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ConnectTimeout</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ControlMaster</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ControlPath</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ControlPersist</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>DynamicForward</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>EnableEscapeCommandline</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>EscapeChar</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ExitOnForwardFailure</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>FingerprintHash</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ForkAfterAuthentication</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ForwardAgent</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ForwardX11</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ForwardX11Timeout</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ForwardX11Trusted</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>GatewayPorts</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>GlobalKnownHostsFile</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>GSSAPIAuthentication</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>GSSAPIDelegateCredentials</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>HashKnownHosts</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>Host</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>HostbasedAcceptedAlgorithms</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>HostbasedAuthentication</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>HostKeyAlgorithms</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>HostKeyAlias</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>Hostname</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>IdentitiesOnly</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>IdentityAgent</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>IdentityFile</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>IPQoS</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>KbdInteractiveAuthentication</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>KbdInteractiveDevices</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>KexAlgorithms</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>KnownHostsCommand</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>LocalCommand</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>LocalForward</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>LogLevel</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>MACs</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>Match</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>NoHostAuthenticationForLocalhost</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>NumberOfPasswordPrompts</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>PasswordAuthentication</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>PermitLocalCommand</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>PermitRemoteOpen</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>PKCS11Provider</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>Port</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>PreferredAuthentications</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ProxyCommand</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ProxyJump</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ProxyUseFdpass</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>PubkeyAcceptedAlgorithms</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>PubkeyAuthentication</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>RekeyLimit</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>RemoteCommand</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>RemoteForward</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>RequestTTY</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>RequiredRSASize</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>SendEnv</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ServerAliveInterval</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>ServerAliveCountMax</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>SessionType</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>SetEnv</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>StdinNull</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>StreamLocalBindMask</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>StreamLocalBindUnlink</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>StrictHostKeyChecking</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>TCPKeepAlive</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>Tunnel</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>TunnelDevice</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>UpdateHostKeys</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>User</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>UserKnownHostsFile</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>VerifyHostKeyDNS</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>VisualHostKey</dt> <dd style="width: auto;">&#x00A0;</dd> <dt>XAuthLocation</dt> <dd style="width: auto;">&#x00A0;</dd> </dl> </div> <p class="Pp"></p> </dd> <dt id="P"><a class="permalink" href="#P"><code class="Fl">-P</code></a> <var class="Ar">tag</var></dt> <dd>Specify a tag name that may be used to select configuration in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a>. Refer to the <code class="Cm">Tag</code> and <code class="Cm">Match</code> keywords in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for more information.</dd> <dt id="p"><a class="permalink" href="#p"><code class="Fl">-p</code></a> <var class="Ar">port</var></dt> <dd>Port to connect to on the remote host. This can be specified on a per-host basis in the configuration file. <p class="Pp"></p> </dd> <dt id="Q"><a class="permalink" href="#Q"><code class="Fl">-Q</code></a> <var class="Ar">query_option</var></dt> <dd>Queries for the algorithms supported by one of the following features: <var class="Ar">cipher</var> (supported symmetric ciphers), <var class="Ar">cipher-auth</var> (supported symmetric ciphers that support authenticated encryption), <var class="Ar">help</var> (supported query terms for use with the <code class="Fl">-Q</code> flag), <var class="Ar">mac</var> (supported message integrity codes), <var class="Ar">kex</var> (key exchange algorithms), <var class="Ar">key</var> (key types), <var class="Ar">key-ca-sign</var> (valid CA signature algorithms for certificates), <var class="Ar">key-cert</var> (certificate key types), <var class="Ar">key-plain</var> (non-certificate key types), <var class="Ar">key-sig</var> (all key types and signature algorithms), <var class="Ar">protocol-version</var> (supported SSH protocol versions), and <var class="Ar">sig</var> (supported signature algorithms). Alternatively, any keyword from <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> or <a class="Xr" href="/sshd_config.5" aria-label="sshd_config, section 5">sshd_config(5)</a> that takes an algorithm list may be used as an alias for the corresponding query_option. <p class="Pp"></p> </dd> <dt id="q"><a class="permalink" href="#q"><code class="Fl">-q</code></a></dt> <dd>Quiet mode. Causes most warning and diagnostic messages to be suppressed. <p class="Pp"></p> </dd> <dt id="R"><a class="permalink" href="#R"><code class="Fl">-R</code></a> [<var class="Ar">bind_address</var>:]<var class="Ar">port</var>:<var class="Ar">host</var>:<var class="Ar">hostport</var></dt> <dd style="width: auto;">&#x00A0;</dd> <dt id="R~2"><a class="permalink" href="#R~2"><code class="Fl">-R</code></a> [<var class="Ar">bind_address</var>:]<var class="Ar">port</var>:<var class="Ar">local_socket</var></dt> <dd style="width: auto;">&#x00A0;</dd> <dt id="R~3"><a class="permalink" href="#R~3"><code class="Fl">-R</code></a> <var class="Ar">remote_socket</var>:<var class="Ar">host</var>:<var class="Ar">hostport</var></dt> <dd style="width: auto;">&#x00A0;</dd> <dt id="R~4"><a class="permalink" href="#R~4"><code class="Fl">-R</code></a> <var class="Ar">remote_socket</var>:<var class="Ar">local_socket</var></dt> <dd style="width: auto;">&#x00A0;</dd> <dt id="R~5"><a class="permalink" href="#R~5"><code class="Fl">-R</code></a> [<var class="Ar">bind_address</var>:]<var class="Ar">port</var></dt> <dd>Specifies that connections to the given TCP port or Unix socket on the remote (server) host are to be forwarded to the local side. <p class="Pp">This works by allocating a socket to listen to either a TCP <var class="Ar">port</var> or to a Unix socket on the remote side. Whenever a connection is made to this port or Unix socket, the connection is forwarded over the secure channel, and a connection is made from the local machine to either an explicit destination specified by <var class="Ar">host</var> port <var class="Ar">hostport</var>, or <var class="Ar">local_socket</var>, or, if no explicit destination was specified, <code class="Nm">ssh</code> will act as a SOCKS 4/5 proxy and forward connections to the destinations requested by the remote SOCKS client.</p> <p class="Pp">Port forwardings can also be specified in the configuration file. Privileged ports can be forwarded only when logging in as root on the remote machine. IPv6 addresses can be specified by enclosing the address in square brackets.</p> <p class="Pp">By default, TCP listening sockets on the server will be bound to the loopback interface only. This may be overridden by specifying a <var class="Ar">bind_address</var>. An empty <var class="Ar">bind_address</var>, or the address &#x2018;<code class="Li">*</code>&#x2019;, indicates that the remote socket should listen on all interfaces. Specifying a remote <var class="Ar">bind_address</var> will only succeed if the server's <code class="Cm">GatewayPorts</code> option is enabled (see <a class="Xr" href="/sshd_config.5" aria-label="sshd_config, section 5">sshd_config(5)</a>).</p> <p class="Pp">If the <var class="Ar">port</var> argument is &#x2018;<code class="Li">0</code>&#x2019;, the listen port will be dynamically allocated on the server and reported to the client at run time. When used together with <code class="Ic">-O forward</code>, the allocated port will be printed to the standard output.</p> <p class="Pp"></p> </dd> <dt id="S"><a class="permalink" href="#S"><code class="Fl">-S</code></a> <var class="Ar">ctl_path</var></dt> <dd>Specifies the location of a control socket for connection sharing, or the string &#x201C;none&#x201D; to disable connection sharing. Refer to the description of <code class="Cm">ControlPath</code> and <code class="Cm">ControlMaster</code> in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for details. <p class="Pp"></p> </dd> <dt id="s"><a class="permalink" href="#s"><code class="Fl">-s</code></a></dt> <dd>May be used to request invocation of a subsystem on the remote system. Subsystems facilitate the use of SSH as a secure transport for other applications (e.g. <a class="Xr" href="/sftp.1" aria-label="sftp, section 1">sftp(1)</a>). The subsystem is specified as the remote command. Refer to the description of <code class="Cm">SessionType</code> in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for details. <p class="Pp"></p> </dd> <dt id="T"><a class="permalink" href="#T"><code class="Fl">-T</code></a></dt> <dd>Disable pseudo-terminal allocation. <p class="Pp"></p> </dd> <dt id="t"><a class="permalink" href="#t"><code class="Fl">-t</code></a></dt> <dd>Force pseudo-terminal allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple <code class="Fl">-t</code> options force tty allocation, even if <code class="Nm">ssh</code> has no local tty. <p class="Pp"></p> </dd> <dt id="V"><a class="permalink" href="#V"><code class="Fl">-V</code></a></dt> <dd>Display the version number and exit. <p class="Pp"></p> </dd> <dt id="v"><a class="permalink" href="#v"><code class="Fl">-v</code></a></dt> <dd>Verbose mode. Causes <code class="Nm">ssh</code> to print debugging messages about its progress. This is helpful in debugging connection, authentication, and configuration problems. Multiple <code class="Fl">-v</code> options increase the verbosity. The maximum is 3. <p class="Pp"></p> </dd> <dt id="W"><a class="permalink" href="#W"><code class="Fl">-W</code></a> <var class="Ar">host</var>:<var class="Ar">port</var></dt> <dd>Requests that standard input and output on the client be forwarded to <var class="Ar">host</var> on <var class="Ar">port</var> over the secure channel. Implies <code class="Fl">-N</code>, <code class="Fl">-T</code>, <code class="Cm">ExitOnForwardFailure</code> and <code class="Cm">ClearAllForwardings</code>, though these can be overridden in the configuration file or using <code class="Fl">-o</code> command line options. <p class="Pp"></p> </dd> <dt id="w"><a class="permalink" href="#w"><code class="Fl">-w</code></a> <var class="Ar">local_tun</var>[:<var class="Ar">remote_tun</var>]</dt> <dd>Requests tunnel device forwarding with the specified <a class="Xr" href="/tun.4" aria-label="tun, section 4">tun(4)</a> devices between the client (<var class="Ar">local_tun</var>) and the server (<var class="Ar">remote_tun</var>). <p class="Pp">The devices may be specified by numerical ID or the keyword &#x201C;any&#x201D;, which uses the next available tunnel device. If <var class="Ar">remote_tun</var> is not specified, it defaults to &#x201C;any&#x201D;. See also the <code class="Cm">Tunnel</code> and <code class="Cm">TunnelDevice</code> directives in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a>.</p> <p class="Pp">If the <code class="Cm">Tunnel</code> directive is unset, it will be set to the default tunnel mode, which is &#x201C;point-to-point&#x201D;. If a different <code class="Cm">Tunnel</code> forwarding mode it desired, then it should be specified before <code class="Fl">-w</code>.</p> <p class="Pp"></p> </dd> <dt id="X"><a class="permalink" href="#X"><code class="Fl">-X</code></a></dt> <dd>Enables X11 forwarding. This can also be specified on a per-host basis in a configuration file. <p class="Pp">X11 forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the user's X authorization database) can access the local X11 display through the forwarded connection. An attacker may then be able to perform activities such as keystroke monitoring.</p> <p class="Pp">For this reason, X11 forwarding is subjected to X11 SECURITY extension restrictions by default. Refer to the <code class="Nm">ssh</code> <code class="Fl">-Y</code> option and the <code class="Cm">ForwardX11Trusted</code> directive in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for more information.</p> <p class="Pp"></p> </dd> <dt id="x"><a class="permalink" href="#x"><code class="Fl">-x</code></a></dt> <dd>Disables X11 forwarding. <p class="Pp"></p> </dd> <dt id="Y"><a class="permalink" href="#Y"><code class="Fl">-Y</code></a></dt> <dd>Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls. <p class="Pp"></p> </dd> <dt id="y"><a class="permalink" href="#y"><code class="Fl">-y</code></a></dt> <dd>Send log information using the <a class="Xr" href="/syslog.3" aria-label="syslog, section 3">syslog(3)</a> system module. By default this information is sent to stderr.</dd> </dl> <p class="Pp"><code class="Nm">ssh</code> may additionally obtain configuration data from a per-user configuration file and a system-wide configuration file. The file format and configuration options are described in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a>.</p> </section> <section class="Sh"> <h2 class="Sh" id="AUTHENTICATION"><a class="permalink" href="#AUTHENTICATION">AUTHENTICATION</a></h2> <p class="Pp">The OpenSSH SSH client supports SSH protocol 2.</p> <p class="Pp">The methods available for authentication are: GSSAPI-based authentication, host-based authentication, public key authentication, keyboard-interactive authentication, and password authentication. Authentication methods are tried in the order specified above, though <code class="Cm">PreferredAuthentications</code> can be used to change the default order.</p> <p class="Pp" id="must">Host-based authentication works as follows: If the machine the user logs in from is listed in <span class="Pa">/etc/hosts.equiv</span> or <span class="Pa">/etc/shosts.equiv</span> on the remote machine, the user is non-root and the user names are the same on both sides, or if the files <span class="Pa">~/.rhosts</span> or <span class="Pa">~/.shosts</span> exist in the user's home directory on the remote machine and contain a line containing the name of the client machine and the name of the user on that machine, the user is considered for login. Additionally, the server <a class="permalink" href="#must"><i class="Em">must</i></a> be able to verify the client's host key (see the description of <span class="Pa">/etc/ssh/ssh_known_hosts</span> and <span class="Pa">~/.ssh/known_hosts</span>, below) for login to be permitted. This authentication method closes security holes due to IP spoofing, DNS spoofing, and routing spoofing. [Note to the administrator: <span class="Pa">/etc/hosts.equiv</span>, <span class="Pa">~/.rhosts</span>, and the rlogin/rsh protocol in general, are inherently insecure and should be disabled if security is desired.]</p> <p class="Pp">Public key authentication works as follows: The scheme is based on public-key cryptography, using cryptosystems where encryption and decryption are done using separate keys, and it is unfeasible to derive the decryption key from the encryption key. The idea is that each user creates a public/private key pair for authentication purposes. The server knows the public key, and only the user knows the private key. <code class="Nm">ssh</code> implements public key authentication protocol automatically, using one of the ECDSA, Ed25519 or RSA algorithms.</p> <p class="Pp">The file <span class="Pa">~/.ssh/authorized_keys</span> lists the public keys that are permitted for logging in. When the user logs in, the <code class="Nm">ssh</code> program tells the server which key pair it would like to use for authentication. The client proves that it has access to the private key and the server checks that the corresponding public key is authorized to accept the account.</p> <p class="Pp">The server may inform the client of errors that prevented public key authentication from succeeding after authentication completes using a different method. These may be viewed by increasing the <code class="Cm">LogLevel</code> to <code class="Cm">DEBUG</code> or higher (e.g. by using the <code class="Fl">-v</code> flag).</p> <p class="Pp">The user creates their key pair by running <a class="Xr" href="/ssh-keygen.1" aria-label="ssh-keygen, section 1">ssh-keygen(1)</a>. This stores the private key in <span class="Pa">~/.ssh/id_ecdsa</span> (ECDSA), <span class="Pa">~/.ssh/id_ecdsa_sk</span> (authenticator-hosted ECDSA), <span class="Pa">~/.ssh/id_ed25519</span> (Ed25519), <span class="Pa">~/.ssh/id_ed25519_sk</span> (authenticator-hosted Ed25519), or <span class="Pa">~/.ssh/id_rsa</span> (RSA) and stores the public key in <span class="Pa">~/.ssh/id_ecdsa.pub</span> (ECDSA), <span class="Pa">~/.ssh/id_ecdsa_sk.pub</span> (authenticator-hosted ECDSA), <span class="Pa">~/.ssh/id_ed25519.pub</span> (Ed25519), <span class="Pa">~/.ssh/id_ed25519_sk.pub</span> (authenticator-hosted Ed25519), or <span class="Pa">~/.ssh/id_rsa.pub</span> (RSA) in the user's home directory. The user should then copy the public key to <span class="Pa">~/.ssh/authorized_keys</span> in their home directory on the remote machine. The <span class="Pa">authorized_keys</span> file corresponds to the conventional <span class="Pa">~/.rhosts</span> file, and has one key per line, though the lines can be very long. After this, the user can log in without giving the password.</p> <p class="Pp">A variation on public key authentication is available in the form of certificate authentication: instead of a set of public/private keys, signed certificates are used. This has the advantage that a single trusted certification authority can be used in place of many public/private keys. See the CERTIFICATES section of <a class="Xr" href="/ssh-keygen.1" aria-label="ssh-keygen, section 1">ssh-keygen(1)</a> for more information.</p> <p class="Pp">The most convenient way to use public key or certificate authentication may be with an authentication agent. See <a class="Xr" href="/ssh-agent.1" aria-label="ssh-agent, section 1">ssh-agent(1)</a> and (optionally) the <code class="Cm">AddKeysToAgent</code> directive in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for more information.</p> <p class="Pp">Keyboard-interactive authentication works as follows: The server sends an arbitrary &quot;challenge&quot; text and prompts for a response, possibly multiple times. Examples of keyboard-interactive authentication include <span class="Ux">BSD</span> Authentication (see <a class="Xr" href="/login.conf.5" aria-label="login.conf, section 5">login.conf(5)</a>) and PAM (some non-<span class="Ux">OpenBSD</span> systems).</p> <p class="Pp">Finally, if other authentication methods fail, <code class="Nm">ssh</code> prompts the user for a password. The password is sent to the remote host for checking; however, since all communications are encrypted, the password cannot be seen by someone listening on the network.</p> <p class="Pp"><code class="Nm">ssh</code> automatically maintains and checks a database containing identification for all hosts it has ever been used with. Host keys are stored in <span class="Pa">~/.ssh/known_hosts</span> in the user's home directory. Additionally, the file <span class="Pa">/etc/ssh/ssh_known_hosts</span> is automatically checked for known hosts. Any new hosts are automatically added to the user's file. If a host's identification ever changes, <code class="Nm">ssh</code> warns about this and disables password authentication to prevent server spoofing or man-in-the-middle attacks, which could otherwise be used to circumvent the encryption. The <code class="Cm">StrictHostKeyChecking</code> option can be used to control logins to machines whose host key is not known or has changed.</p> <p class="Pp">When the user's identity has been accepted by the server, the server either executes the given command in a non-interactive session or, if no command has been specified, logs into the machine and gives the user a normal shell as an interactive session. All communication with the remote command or shell will be automatically encrypted.</p> <p class="Pp">If an interactive session is requested, <code class="Nm">ssh</code> by default will only request a pseudo-terminal (pty) for interactive sessions when the client has one. The flags <code class="Fl">-T</code> and <code class="Fl">-t</code> can be used to override this behaviour.</p> <p class="Pp">If a pseudo-terminal has been allocated, the user may use the escape characters noted below.</p> <p class="Pp">If no pseudo-terminal has been allocated, the session is transparent and can be used to reliably transfer binary data. On most systems, setting the escape character to &#x201C;none&#x201D; will also make the session transparent even if a tty is used.</p> <p class="Pp">The session terminates when the command or shell on the remote machine exits and all X11 and TCP connections have been closed.</p> </section> <section class="Sh"> <h2 class="Sh" id="ESCAPE_CHARACTERS"><a class="permalink" href="#ESCAPE_CHARACTERS">ESCAPE CHARACTERS</a></h2> <p class="Pp">When a pseudo-terminal has been requested, <code class="Nm">ssh</code> supports a number of functions through the use of an escape character.</p> <p class="Pp">A single tilde character can be sent as <code class="Ic">~~</code> or by following the tilde by a character other than those described below. The escape character must always follow a newline to be interpreted as special. The escape character can be changed in configuration files using the <code class="Cm">EscapeChar</code> configuration directive or on the command line by the <code class="Fl">-e</code> option.</p> <p class="Pp">The supported escapes (assuming the default &#x2018;<code class="Li">~</code>&#x2019;) are:</p> <dl class="Bl-tag"> <dt id="_."><a class="permalink" href="#_."><code class="Cm">~.</code></a></dt> <dd>Disconnect.</dd> <dt id="__Z"><a class="permalink" href="#__Z"><code class="Cm">~^Z</code></a></dt> <dd>Background <code class="Nm">ssh</code>.</dd> <dt id="__"><a class="permalink" href="#__"><code class="Cm">~#</code></a></dt> <dd>List forwarded connections.</dd> <dt id="_&amp;"><a class="permalink" href="#_&amp;"><code class="Cm">~&amp;</code></a></dt> <dd>Background <code class="Nm">ssh</code> at logout when waiting for forwarded connection / X11 sessions to terminate.</dd> <dt id="_?"><a class="permalink" href="#_?"><code class="Cm">~?</code></a></dt> <dd>Display a list of escape characters.</dd> <dt id="_B"><a class="permalink" href="#_B"><code class="Cm">~B</code></a></dt> <dd>Send a BREAK to the remote system (only useful if the peer supports it).</dd> <dt id="_C"><a class="permalink" href="#_C"><code class="Cm">~C</code></a></dt> <dd>Open command line. Currently this allows the addition of port forwardings using the <code class="Fl">-L</code>, <code class="Fl">-R</code> and <code class="Fl">-D</code> options (see above). It also allows the cancellation of existing port-forwardings with <code class="Fl">-KL</code>[<var class="Ar">bind_address</var>:]<var class="Ar">port</var> for local, <code class="Fl">-KR</code>[<var class="Ar">bind_address</var>:]<var class="Ar">port</var> for remote and <code class="Fl">-KD</code>[<var class="Ar">bind_address</var>:]<var class="Ar">port</var> for dynamic port-forwardings. <code class="Ic">!</code><var class="Ar">command</var> allows the user to execute a local command if the <code class="Ic">PermitLocalCommand</code> option is enabled in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a>. Basic help is available, using the <code class="Fl">-h</code> option.</dd> <dt id="_R"><a class="permalink" href="#_R"><code class="Cm">~R</code></a></dt> <dd>Request rekeying of the connection (only useful if the peer supports it).</dd> <dt id="_V"><a class="permalink" href="#_V"><code class="Cm">~V</code></a></dt> <dd>Decrease the verbosity (<code class="Ic">LogLevel</code>) when errors are being written to stderr.</dd> <dt id="_v"><a class="permalink" href="#_v"><code class="Cm">~v</code></a></dt> <dd>Increase the verbosity (<code class="Ic">LogLevel</code>) when errors are being written to stderr.</dd> </dl> </section> <section class="Sh"> <h2 class="Sh" id="TCP_FORWARDING"><a class="permalink" href="#TCP_FORWARDING">TCP FORWARDING</a></h2> <p class="Pp">Forwarding of arbitrary TCP connections over a secure channel can be specified either on the command line or in a configuration file. One possible application of TCP forwarding is a secure connection to a mail server; another is going through firewalls.</p> <p class="Pp">In the example below, we look at encrypting communication for an IRC client, even though the IRC server it connects to does not directly support encrypted communication. This works as follows: the user connects to the remote host using <code class="Nm">ssh</code>, specifying the ports to be used to forward the connection. After that it is possible to start the program locally, and <code class="Nm">ssh</code> will encrypt and forward the connection to the remote server.</p> <p class="Pp">The following example tunnels an IRC session from the client to an IRC server at &#x201C;server.example.com&#x201D;, joining channel &#x201C;#users&#x201D;, nickname &#x201C;pinky&#x201D;, using the standard IRC port, 6667:</p> <div class="Bd Pp Bd-indent Li"> <pre>$ ssh -f -L 6667:localhost:6667 server.example.com sleep 10 $ irc -c '#users' pinky IRC/127.0.0.1</pre> </div> <p class="Pp">The <code class="Fl">-f</code> option backgrounds <code class="Nm">ssh</code> and the remote command &#x201C;sleep 10&#x201D; is specified to allow an amount of time (10 seconds, in the example) to start the program which is going to use the tunnel. If no connections are made within the time specified, <code class="Nm">ssh</code> will exit.</p> </section> <section class="Sh"> <h2 class="Sh" id="X11_FORWARDING"><a class="permalink" href="#X11_FORWARDING">X11 FORWARDING</a></h2> <p class="Pp">If the <code class="Cm">ForwardX11</code> variable is set to &#x201C;yes&#x201D; (or see the description of the <code class="Fl">-X</code>, <code class="Fl">-x</code>, and <code class="Fl">-Y</code> options above) and the user is using X11 (the <code class="Ev">DISPLAY</code> environment variable is set), the connection to the X11 display is automatically forwarded to the remote side in such a way that any X11 programs started from the shell (or command) will go through the encrypted channel, and the connection to the real X server will be made from the local machine. The user should not manually set <code class="Ev">DISPLAY</code>. Forwarding of X11 connections can be configured on the command line or in configuration files.</p> <p class="Pp">The <code class="Ev">DISPLAY</code> value set by <code class="Nm">ssh</code> will point to the server machine, but with a display number greater than zero. This is normal, and happens because <code class="Nm">ssh</code> creates a &#x201C;proxy&#x201D; X server on the server machine for forwarding the connections over the encrypted channel.</p> <p class="Pp"><code class="Nm">ssh</code> will also automatically set up Xauthority data on the server machine. For this purpose, it will generate a random authorization cookie, store it in Xauthority on the server, and verify that any forwarded connections carry this cookie and replace it by the real cookie when the connection is opened. The real authentication cookie is never sent to the server machine (and no cookies are sent in the plain).</p> <p class="Pp">If the <code class="Cm">ForwardAgent</code> variable is set to &#x201C;yes&#x201D; (or see the description of the <code class="Fl">-A</code> and <code class="Fl">-a</code> options above) and the user is using an authentication agent, the connection to the agent is automatically forwarded to the remote side.</p> </section> <section class="Sh"> <h2 class="Sh" id="VERIFYING_HOST_KEYS"><a class="permalink" href="#VERIFYING_HOST_KEYS">VERIFYING HOST KEYS</a></h2> <p class="Pp">When connecting to a server for the first time, a fingerprint of the server's public key is presented to the user (unless the option <code class="Cm">StrictHostKeyChecking</code> has been disabled). Fingerprints can be determined using <a class="Xr" href="/ssh-keygen.1" aria-label="ssh-keygen, section 1">ssh-keygen(1)</a>:</p> <p class="Pp"></p> <div class="Bd Bd-indent"><code class="Li">$ ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key</code></div> <p class="Pp">If the fingerprint is already known, it can be matched and the key can be accepted or rejected. If only legacy (MD5) fingerprints for the server are available, the <a class="Xr" href="/ssh-keygen.1" aria-label="ssh-keygen, section 1">ssh-keygen(1)</a> <code class="Fl">-E</code> option may be used to downgrade the fingerprint algorithm to match.</p> <p class="Pp" id="random">Because of the difficulty of comparing host keys just by looking at fingerprint strings, there is also support to compare host keys visually, using <a class="permalink" href="#random"><i class="Em">random art</i></a>. By setting the <code class="Cm">VisualHostKey</code> option to &#x201C;yes&#x201D;, a small ASCII graphic gets displayed on every login to a server, no matter if the session itself is interactive or not. By learning the pattern a known server produces, a user can easily find out that the host key has changed when a completely different pattern is displayed. Because these patterns are not unambiguous however, a pattern that looks similar to the pattern remembered only gives a good probability that the host key is the same, not guaranteed proof.</p> <p class="Pp">To get a listing of the fingerprints along with their random art for all known hosts, the following command line can be used:</p> <p class="Pp"></p> <div class="Bd Bd-indent"><code class="Li">$ ssh-keygen -lv -f ~/.ssh/known_hosts</code></div> <p class="Pp">If the fingerprint is unknown, an alternative method of verification is available: SSH fingerprints verified by DNS. An additional resource record (RR), SSHFP, is added to a zonefile and the connecting client is able to match the fingerprint with that of the key presented.</p> <p class="Pp">In this example, we are connecting a client to a server, &#x201C;host.example.com&#x201D;. The SSHFP resource records should first be added to the zonefile for host.example.com:</p> <div class="Bd Pp Bd-indent Li"> <pre>$ ssh-keygen -r host.example.com.</pre> </div> <p class="Pp">The output lines will have to be added to the zonefile. To check that the zone is answering fingerprint queries:</p> <p class="Pp"></p> <div class="Bd Bd-indent"><code class="Li">$ dig -t SSHFP host.example.com</code></div> <p class="Pp">Finally the client connects:</p> <div class="Bd Pp Bd-indent Li"> <pre>$ ssh -o &quot;VerifyHostKeyDNS ask&quot; host.example.com [...] Matching host key fingerprint found in DNS. Are you sure you want to continue connecting (yes/no)?</pre> </div> <p class="Pp">See the <code class="Cm">VerifyHostKeyDNS</code> option in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a> for more information.</p> </section> <section class="Sh"> <h2 class="Sh" id="SSH-BASED_VIRTUAL_PRIVATE_NETWORKS"><a class="permalink" href="#SSH-BASED_VIRTUAL_PRIVATE_NETWORKS">SSH-BASED VIRTUAL PRIVATE NETWORKS</a></h2> <p class="Pp"><code class="Nm">ssh</code> contains support for Virtual Private Network (VPN) tunnelling using the <a class="Xr" href="/tun.4" aria-label="tun, section 4">tun(4)</a> network pseudo-device, allowing two networks to be joined securely. The <a class="Xr" href="/sshd_config.5" aria-label="sshd_config, section 5">sshd_config(5)</a> configuration option <code class="Cm">PermitTunnel</code> controls whether the server supports this, and at what level (layer 2 or 3 traffic).</p> <p class="Pp">The following example would connect client network 10.0.50.0/24 with remote network 10.0.99.0/24 using a point-to-point connection from 10.1.1.1 to 10.1.1.2, provided that the SSH server running on the gateway to the remote network, at 192.168.1.15, allows it.</p> <p class="Pp">On the client:</p> <div class="Bd Pp Bd-indent Li"> <pre># ssh -f -w 0:1 192.168.1.15 true # ifconfig tun0 10.1.1.1 10.1.1.2 netmask 255.255.255.252 # route add 10.0.99.0/24 10.1.1.2</pre> </div> <p class="Pp">On the server:</p> <div class="Bd Pp Bd-indent Li"> <pre># ifconfig tun1 10.1.1.2 10.1.1.1 netmask 255.255.255.252 # route add 10.0.50.0/24 10.1.1.1</pre> </div> <p class="Pp">Client access may be more finely tuned via the <span class="Pa">/root/.ssh/authorized_keys</span> file (see below) and the <code class="Cm">PermitRootLogin</code> server option. The following entry would permit connections on <a class="Xr" href="/tun.4" aria-label="tun, section 4">tun(4)</a> device 1 from user &#x201C;jane&#x201D; and on tun device 2 from user &#x201C;john&#x201D;, if <code class="Cm">PermitRootLogin</code> is set to &#x201C;forced-commands-only&#x201D;:</p> <div class="Bd Pp Bd-indent Li"> <pre>tunnel=&quot;1&quot;,command=&quot;sh /etc/netstart tun1&quot; ssh-rsa ... jane tunnel=&quot;2&quot;,command=&quot;sh /etc/netstart tun2&quot; ssh-rsa ... john</pre> </div> <p class="Pp">Since an SSH-based setup entails a fair amount of overhead, it may be more suited to temporary setups, such as for wireless VPNs. More permanent VPNs are better provided by tools such as <a class="Xr" href="/ipsecctl.8" aria-label="ipsecctl, section 8">ipsecctl(8)</a> and <a class="Xr" href="/isakmpd.8" aria-label="isakmpd, section 8">isakmpd(8)</a>.</p> </section> <section class="Sh"> <h2 class="Sh" id="ENVIRONMENT"><a class="permalink" href="#ENVIRONMENT">ENVIRONMENT</a></h2> <p class="Pp"><code class="Nm">ssh</code> will normally set the following environment variables:</p> <dl class="Bl-tag"> <dt id="DISPLAY"><a class="permalink" href="#DISPLAY"><code class="Ev">DISPLAY</code></a></dt> <dd>The <code class="Ev">DISPLAY</code> variable indicates the location of the X11 server. It is automatically set by <code class="Nm">ssh</code> to point to a value of the form &#x201C;hostname:n&#x201D;, where &#x201C;hostname&#x201D; indicates the host where the shell runs, and &#x2018;n&#x2019; is an integer &#x2265; 1. <code class="Nm">ssh</code> uses this special value to forward X11 connections over the secure channel. The user should normally not set <code class="Ev">DISPLAY</code> explicitly, as that will render the X11 connection insecure (and will require the user to manually copy any required authorization cookies).</dd> <dt id="HOME"><a class="permalink" href="#HOME"><code class="Ev">HOME</code></a></dt> <dd>Set to the path of the user's home directory.</dd> <dt id="LOGNAME"><a class="permalink" href="#LOGNAME"><code class="Ev">LOGNAME</code></a></dt> <dd>Synonym for <code class="Ev">USER</code>; set for compatibility with systems that use this variable.</dd> <dt id="MAIL"><a class="permalink" href="#MAIL"><code class="Ev">MAIL</code></a></dt> <dd>Set to the path of the user's mailbox.</dd> <dt id="PATH"><a class="permalink" href="#PATH"><code class="Ev">PATH</code></a></dt> <dd>Set to the default <code class="Ev">PATH</code>, as specified when compiling <code class="Nm">ssh</code>.</dd> <dt id="SSH_ASKPASS"><a class="permalink" href="#SSH_ASKPASS"><code class="Ev">SSH_ASKPASS</code></a></dt> <dd>If <code class="Nm">ssh</code> needs a passphrase, it will read the passphrase from the current terminal if it was run from a terminal. If <code class="Nm">ssh</code> does not have a terminal associated with it but <code class="Ev">DISPLAY</code> and <code class="Ev">SSH_ASKPASS</code> are set, it will execute the program specified by <code class="Ev">SSH_ASKPASS</code> and open an X11 window to read the passphrase. This is particularly useful when calling <code class="Nm">ssh</code> from a <span class="Pa">.xsession</span> or related script. (Note that on some machines it may be necessary to redirect the input from <span class="Pa">/dev/null</span> to make this work.)</dd> <dt id="SSH_ASKPASS_REQUIRE"><a class="permalink" href="#SSH_ASKPASS_REQUIRE"><code class="Ev">SSH_ASKPASS_REQUIRE</code></a></dt> <dd>Allows further control over the use of an askpass program. If this variable is set to &#x201C;never&#x201D; then <code class="Nm">ssh</code> will never attempt to use one. If it is set to &#x201C;prefer&#x201D;, then <code class="Nm">ssh</code> will prefer to use the askpass program instead of the TTY when requesting passwords. Finally, if the variable is set to &#x201C;force&#x201D;, then the askpass program will be used for all passphrase input regardless of whether <code class="Ev">DISPLAY</code> is set.</dd> <dt id="SSH_AUTH_SOCK"><a class="permalink" href="#SSH_AUTH_SOCK"><code class="Ev">SSH_AUTH_SOCK</code></a></dt> <dd>Identifies the path of a <span class="Ux">UNIX</span>-domain socket used to communicate with the agent.</dd> <dt id="SSH_CONNECTION"><a class="permalink" href="#SSH_CONNECTION"><code class="Ev">SSH_CONNECTION</code></a></dt> <dd>Identifies the client and server ends of the connection. The variable contains four space-separated values: client IP address, client port number, server IP address, and server port number.</dd> <dt id="SSH_ORIGINAL_COMMAND"><a class="permalink" href="#SSH_ORIGINAL_COMMAND"><code class="Ev">SSH_ORIGINAL_COMMAND</code></a></dt> <dd>This variable contains the original command line if a forced command is executed. It can be used to extract the original arguments.</dd> <dt id="SSH_TTY"><a class="permalink" href="#SSH_TTY"><code class="Ev">SSH_TTY</code></a></dt> <dd>This is set to the name of the tty (path to the device) associated with the current shell or command. If the current session has no tty, this variable is not set.</dd> <dt id="SSH_TUNNEL"><a class="permalink" href="#SSH_TUNNEL"><code class="Ev">SSH_TUNNEL</code></a></dt> <dd>Optionally set by <a class="Xr" href="/sshd.8" aria-label="sshd, section 8">sshd(8)</a> to contain the interface names assigned if tunnel forwarding was requested by the client.</dd> <dt id="SSH_USER_AUTH"><a class="permalink" href="#SSH_USER_AUTH"><code class="Ev">SSH_USER_AUTH</code></a></dt> <dd>Optionally set by <a class="Xr" href="/sshd.8" aria-label="sshd, section 8">sshd(8)</a>, this variable may contain a pathname to a file that lists the authentication methods successfully used when the session was established, including any public keys that were used.</dd> <dt id="TZ"><a class="permalink" href="#TZ"><code class="Ev">TZ</code></a></dt> <dd>This variable is set to indicate the present time zone if it was set when the daemon was started (i.e. the daemon passes the value on to new connections).</dd> <dt id="USER"><a class="permalink" href="#USER"><code class="Ev">USER</code></a></dt> <dd>Set to the name of the user logging in.</dd> </dl> <p class="Pp">Additionally, <code class="Nm">ssh</code> reads <span class="Pa">~/.ssh/environment</span>, and adds lines of the format &#x201C;VARNAME=value&#x201D; to the environment if the file exists and users are allowed to change their environment. For more information, see the <code class="Cm">PermitUserEnvironment</code> option in <a class="Xr" href="/sshd_config.5" aria-label="sshd_config, section 5">sshd_config(5)</a>.</p> </section> <section class="Sh"> <h2 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h2> <dl class="Bl-tag Bl-compact"> <dt><span class="Pa">~/.rhosts</span></dt> <dd>This file is used for host-based authentication (see above). On some machines this file may need to be world-readable if the user's home directory is on an NFS partition, because <a class="Xr" href="/sshd.8" aria-label="sshd, section 8">sshd(8)</a> reads it as root. Additionally, this file must be owned by the user, and must not have write permissions for anyone else. The recommended permission for most machines is read/write for the user, and not accessible by others. <p class="Pp"></p> </dd> <dt><span class="Pa">~/.shosts</span></dt> <dd>This file is used in exactly the same way as <span class="Pa">.rhosts</span>, but allows host-based authentication without permitting login with rlogin/rsh. <p class="Pp"></p> </dd> <dt><span class="Pa">~/.ssh/</span></dt> <dd>This directory is the default location for all user-specific configuration and authentication information. There is no general requirement to keep the entire contents of this directory secret, but the recommended permissions are read/write/execute for the user, and not accessible by others. <p class="Pp"></p> </dd> <dt><span class="Pa">~/.ssh/authorized_keys</span></dt> <dd>Lists the public keys (ECDSA, Ed25519, RSA) that can be used for logging in as this user. The format of this file is described in the <a class="Xr" href="/sshd.8" aria-label="sshd, section 8">sshd(8)</a> manual page. This file is not highly sensitive, but the recommended permissions are read/write for the user, and not accessible by others. <p class="Pp"></p> </dd> <dt><span class="Pa">~/.ssh/config</span></dt> <dd>This is the per-user configuration file. The file format and configuration options are described in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a>. Because of the potential for abuse, this file must have strict permissions: read/write for the user, and not writable by others. <p class="Pp"></p> </dd> <dt><span class="Pa">~/.ssh/environment</span></dt> <dd>Contains additional definitions for environment variables; see <a class="Sx" href="#ENVIRONMENT">ENVIRONMENT</a>, above. <p class="Pp"></p> </dd> <dt><span class="Pa">~/.ssh/id_ecdsa</span></dt> <dd style="width: auto;">&#x00A0;</dd> <dt><span class="Pa">~/.ssh/id_ecdsa_sk</span></dt> <dd style="width: auto;">&#x00A0;</dd> <dt><span class="Pa">~/.ssh/id_ed25519</span></dt> <dd style="width: auto;">&#x00A0;</dd> <dt><span class="Pa">~/.ssh/id_ed25519_sk</span></dt> <dd style="width: auto;">&#x00A0;</dd> <dt><span class="Pa">~/.ssh/id_rsa</span></dt> <dd>Contains the private key for authentication. These files contain sensitive data and should be readable by the user but not accessible by others (read/write/execute). <code class="Nm">ssh</code> will simply ignore a private key file if it is accessible by others. It is possible to specify a passphrase when generating the key which will be used to encrypt the sensitive part of this file using AES-128. <p class="Pp"></p> </dd> <dt><span class="Pa">~/.ssh/id_ecdsa.pub</span></dt> <dd style="width: auto;">&#x00A0;</dd> <dt><span class="Pa">~/.ssh/id_ecdsa_sk.pub</span></dt> <dd style="width: auto;">&#x00A0;</dd> <dt><span class="Pa">~/.ssh/id_ed25519.pub</span></dt> <dd style="width: auto;">&#x00A0;</dd> <dt><span class="Pa">~/.ssh/id_ed25519_sk.pub</span></dt> <dd style="width: auto;">&#x00A0;</dd> <dt><span class="Pa">~/.ssh/id_rsa.pub</span></dt> <dd>Contains the public key for authentication. These files are not sensitive and can (but need not) be readable by anyone. <p class="Pp"></p> </dd> <dt><span class="Pa">~/.ssh/known_hosts</span></dt> <dd>Contains a list of host keys for all hosts the user has logged into that are not already in the systemwide list of known host keys. See <a class="Xr" href="/sshd.8" aria-label="sshd, section 8">sshd(8)</a> for further details of the format of this file. <p class="Pp"></p> </dd> <dt><span class="Pa">~/.ssh/rc</span></dt> <dd>Commands in this file are executed by <code class="Nm">ssh</code> when the user logs in, just before the user's shell (or command) is started. See the <a class="Xr" href="/sshd.8" aria-label="sshd, section 8">sshd(8)</a> manual page for more information. <p class="Pp"></p> </dd> <dt><span class="Pa">/etc/hosts.equiv</span></dt> <dd>This file is for host-based authentication (see above). It should only be writable by root. <p class="Pp"></p> </dd> <dt><span class="Pa">/etc/shosts.equiv</span></dt> <dd>This file is used in exactly the same way as <span class="Pa">hosts.equiv</span>, but allows host-based authentication without permitting login with rlogin/rsh. <p class="Pp"></p> </dd> <dt><span class="Pa">/etc/ssh/ssh_config</span></dt> <dd>Systemwide configuration file. The file format and configuration options are described in <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a>. <p class="Pp"></p> </dd> <dt><span class="Pa">/etc/ssh/ssh_host_ecdsa_key</span></dt> <dd style="width: auto;">&#x00A0;</dd> <dt><span class="Pa">/etc/ssh/ssh_host_ed25519_key</span></dt> <dd style="width: auto;">&#x00A0;</dd> <dt><span class="Pa">/etc/ssh/ssh_host_rsa_key</span></dt> <dd>These files contain the private parts of the host keys and are used for host-based authentication. <p class="Pp"></p> </dd> <dt><span class="Pa">/etc/ssh/ssh_known_hosts</span></dt> <dd>Systemwide list of known host keys. This file should be prepared by the system administrator to contain the public host keys of all machines in the organization. It should be world-readable. See <a class="Xr" href="/sshd.8" aria-label="sshd, section 8">sshd(8)</a> for further details of the format of this file. <p class="Pp"></p> </dd> <dt><span class="Pa">/etc/ssh/sshrc</span></dt> <dd>Commands in this file are executed by <code class="Nm">ssh</code> when the user logs in, just before the user's shell (or command) is started. See the <a class="Xr" href="/sshd.8" aria-label="sshd, section 8">sshd(8)</a> manual page for more information.</dd> </dl> </section> <section class="Sh"> <h2 class="Sh" id="EXIT_STATUS"><a class="permalink" href="#EXIT_STATUS">EXIT STATUS</a></h2> <p class="Pp"><code class="Nm">ssh</code> exits with the exit status of the remote command or with 255 if an error occurred.</p> </section> <section class="Sh"> <h2 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE ALSO</a></h2> <p class="Pp"><a class="Xr" href="/scp.1" aria-label="scp, section 1">scp(1)</a>, <a class="Xr" href="/sftp.1" aria-label="sftp, section 1">sftp(1)</a>, <a class="Xr" href="/ssh-add.1" aria-label="ssh-add, section 1">ssh-add(1)</a>, <a class="Xr" href="/ssh-agent.1" aria-label="ssh-agent, section 1">ssh-agent(1)</a>, <a class="Xr" href="/ssh-keygen.1" aria-label="ssh-keygen, section 1">ssh-keygen(1)</a>, <a class="Xr" href="/ssh-keyscan.1" aria-label="ssh-keyscan, section 1">ssh-keyscan(1)</a>, <a class="Xr" href="/tun.4" aria-label="tun, section 4">tun(4)</a>, <a class="Xr" href="/ssh_config.5" aria-label="ssh_config, section 5">ssh_config(5)</a>, <a class="Xr" href="/ssh-keysign.8" aria-label="ssh-keysign, section 8">ssh-keysign(8)</a>, <a class="Xr" href="/sshd.8" aria-label="sshd, section 8">sshd(8)</a></p> </section> <section class="Sh"> <h2 class="Sh" id="STANDARDS"><a class="permalink" href="#STANDARDS">STANDARDS</a></h2> <p class="Pp"><cite class="Rs"><span class="RsA">S. Lehtinen</span> and <span class="RsA">C. Lonvick</span>, <span class="RsT">The Secure Shell (SSH) Protocol Assigned Numbers</span>, <span class="RsR">RFC 4250</span>, <span class="RsD">January 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">T. Ylonen</span> and <span class="RsA">C. Lonvick</span>, <span class="RsT">The Secure Shell (SSH) Protocol Architecture</span>, <span class="RsR">RFC 4251</span>, <span class="RsD">January 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">T. Ylonen</span> and <span class="RsA">C. Lonvick</span>, <span class="RsT">The Secure Shell (SSH) Authentication Protocol</span>, <span class="RsR">RFC 4252</span>, <span class="RsD">January 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">T. Ylonen</span> and <span class="RsA">C. Lonvick</span>, <span class="RsT">The Secure Shell (SSH) Transport Layer Protocol</span>, <span class="RsR">RFC 4253</span>, <span class="RsD">January 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">T. Ylonen</span> and <span class="RsA">C. Lonvick</span>, <span class="RsT">The Secure Shell (SSH) Connection Protocol</span>, <span class="RsR">RFC 4254</span>, <span class="RsD">January 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">J. Schlyter</span> and <span class="RsA">W. Griffin</span>, <span class="RsT">Using DNS to Securely Publish Secure Shell (SSH) Key Fingerprints</span>, <span class="RsR">RFC 4255</span>, <span class="RsD">January 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">F. Cusack</span> and <span class="RsA">M. Forssen</span>, <span class="RsT">Generic Message Exchange Authentication for the Secure Shell Protocol (SSH)</span>, <span class="RsR">RFC 4256</span>, <span class="RsD">January 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">J. Galbraith</span> and <span class="RsA">P. Remaker</span>, <span class="RsT">The Secure Shell (SSH) Session Channel Break Extension</span>, <span class="RsR">RFC 4335</span>, <span class="RsD">January 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">M. Bellare</span>, <span class="RsA">T. Kohno</span>, and <span class="RsA">C. Namprempre</span>, <span class="RsT">The Secure Shell (SSH) Transport Layer Encryption Modes</span>, <span class="RsR">RFC 4344</span>, <span class="RsD">January 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">B. Harris</span>, <span class="RsT">Improved Arcfour Modes for the Secure Shell (SSH) Transport Layer Protocol</span>, <span class="RsR">RFC 4345</span>, <span class="RsD">January 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">M. Friedl</span>, <span class="RsA">N. Provos</span>, and <span class="RsA">W. Simpson</span>, <span class="RsT">Diffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer Protocol</span>, <span class="RsR">RFC 4419</span>, <span class="RsD">March 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">J. Galbraith</span> and <span class="RsA">R. Thayer</span>, <span class="RsT">The Secure Shell (SSH) Public Key File Format</span>, <span class="RsR">RFC 4716</span>, <span class="RsD">November 2006</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">D. Stebila</span> and <span class="RsA">J. Green</span>, <span class="RsT">Elliptic Curve Algorithm Integration in the Secure Shell Transport Layer</span>, <span class="RsR">RFC 5656</span>, <span class="RsD">December 2009</span>.</cite></p> <p class="Pp"><cite class="Rs"><span class="RsA">A. Perrig</span> and <span class="RsA">D. Song</span>, <span class="RsT">Hash Visualization: a New Technique to improve Real-World Security</span>, <span class="RsD">1999</span>, <span class="RsO">International Workshop on Cryptographic Techniques and E-Commerce (CrypTEC '99)</span>.</cite></p> </section> <section class="Sh"> <h2 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h2> <p class="Pp">OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH protocol versions 1.5 and 2.0.</p> </section> </main> <div class="foot" role="doc-pagefooter" aria-label="Manual footer line"><span class="foot-left"></span><span class="foot-date">July 18, 2024</span> <span class="foot-os">OpenBSD-current</span></div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10