blob: 4011c65aa662eec9a91c8f25439eadf9de70d895 [file] [log] [blame]
Damien Miller32aa1441999-10-29 09:15:49 +10001.\"
Damien Miller32aa1441999-10-29 09:15:49 +10002.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
Damien Miller32aa1441999-10-29 09:15:49 +10003.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4.\" All rights reserved
5.\"
Damien Millere4340be2000-09-16 13:29:08 +11006.\" As far as I am concerned, the code I have written for this software
7.\" can be used freely for any purpose. Any derived versions of this
8.\" software must be clearly marked as such, and if the derived work is
9.\" incompatible with the protocol description in the RFC file, it must be
10.\" called by a name other than "ssh" or "Secure Shell".
Damien Miller32aa1441999-10-29 09:15:49 +100011.\"
Ben Lindstrom92a2e382001-03-05 06:59:27 +000012.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
13.\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
14.\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
Damien Millere4340be2000-09-16 13:29:08 +110015.\"
16.\" Redistribution and use in source and binary forms, with or without
17.\" modification, are permitted provided that the following conditions
18.\" are met:
19.\" 1. Redistributions of source code must retain the above copyright
20.\" notice, this list of conditions and the following disclaimer.
21.\" 2. Redistributions in binary form must reproduce the above copyright
22.\" notice, this list of conditions and the following disclaimer in the
23.\" documentation and/or other materials provided with the distribution.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Damien Miller32aa1441999-10-29 09:15:49 +100035.\"
jmc@openbsd.orge4eb7d92016-07-16 06:57:55 +000036.\" $OpenBSD: ssh.1,v 1.376 2016/07/16 06:57:55 jmc Exp $
37.Dd $Mdocdate: July 16 2016 $
Damien Miller32aa1441999-10-29 09:15:49 +100038.Dt SSH 1
39.Os
40.Sh NAME
41.Nm ssh
Ben Lindstromd58eb5f2001-03-07 06:07:22 +000042.Nd OpenSSH SSH client (remote login program)
Damien Miller32aa1441999-10-29 09:15:49 +100043.Sh SYNOPSIS
44.Nm ssh
Damien Millerbcfbc482010-07-16 13:59:11 +100045.Bk -words
jmc@openbsd.orgb1ba15f2014-10-09 06:21:31 +000046.Op Fl 1246AaCfGgKkMNnqsTtVvXxYy
Ben Lindstrome0f88042001-04-30 13:06:24 +000047.Op Fl b Ar bind_address
Damien Miller30c3d422000-05-09 11:02:59 +100048.Op Fl c Ar cipher_spec
Damien Millerbcfbc482010-07-16 13:59:11 +100049.Op Fl D Oo Ar bind_address : Oc Ns Ar port
Damien Miller03d4d7e2013-04-23 15:21:06 +100050.Op Fl E Ar log_file
Damien Miller32aa1441999-10-29 09:15:49 +100051.Op Fl e Ar escape_char
Ben Lindstrom14f31ab2001-09-12 17:48:04 +000052.Op Fl F Ar configfile
Damien Miller048dc932010-02-12 09:22:04 +110053.Op Fl I Ar pkcs11
Darren Tucker61776952003-10-02 16:19:47 +100054.Op Fl i Ar identity_file
jmc@openbsd.orge4eb7d92016-07-16 06:57:55 +000055.Op Fl J Oo Ar user Ns @ Oc Ns Ar host Ns Op : Ns Ar port
millert@openbsd.org79ec2142015-07-20 15:39:52 +000056.Op Fl L Ar address
Darren Tucker61776952003-10-02 16:19:47 +100057.Op Fl l Ar login_name
58.Op Fl m Ar mac_spec
Darren Tucker7ebfc102004-11-07 20:06:19 +110059.Op Fl O Ar ctl_cmd
Darren Tucker61776952003-10-02 16:19:47 +100060.Op Fl o Ar option
Darren Tucker61776952003-10-02 16:19:47 +100061.Op Fl p Ar port
djm@openbsd.orgc0f55db2015-09-11 03:42:32 +000062.Op Fl Q Ar query_option
millert@openbsd.org79ec2142015-07-20 15:39:52 +000063.Op Fl R Ar address
Darren Tucker7ebfc102004-11-07 20:06:19 +110064.Op Fl S Ar ctl_path
Darren Tucker7ad8dd22010-01-12 19:40:27 +110065.Op Fl W Ar host : Ns Ar port
Damien Millerbcfbc482010-07-16 13:59:11 +100066.Op Fl w Ar local_tun Ns Op : Ns Ar remote_tun
Darren Tucker61776952003-10-02 16:19:47 +100067.Oo Ar user Ns @ Oc Ns Ar hostname
Damien Miller32aa1441999-10-29 09:15:49 +100068.Op Ar command
Damien Millerbcfbc482010-07-16 13:59:11 +100069.Ek
Damien Miller22c77262000-04-13 12:26:34 +100070.Sh DESCRIPTION
Damien Miller32aa1441999-10-29 09:15:49 +100071.Nm
Ben Lindstromd58eb5f2001-03-07 06:07:22 +000072(SSH client) is a program for logging into a remote machine and for
Damien Miller7684ee12000-03-17 23:40:15 +110073executing commands on a remote machine.
mmcc@openbsd.org5e288922015-11-06 00:31:41 +000074It is intended to provide secure encrypted communications between
Damien Miller7684ee12000-03-17 23:40:15 +110075two untrusted hosts over an insecure network.
Damien Millera8a0f652014-07-30 12:32:28 +100076X11 connections, arbitrary TCP ports and
77.Ux Ns -domain
78sockets can also be forwarded over the secure channel.
Damien Miller32aa1441999-10-29 09:15:49 +100079.Pp
80.Nm
Damien Miller22c77262000-04-13 12:26:34 +100081connects and logs into the specified
Darren Tucker61776952003-10-02 16:19:47 +100082.Ar hostname
83(with optional
84.Ar user
85name).
Damien Miller32aa1441999-10-29 09:15:49 +100086The user must prove
Damien Millere247cc42000-05-07 12:03:14 +100087his/her identity to the remote machine using one of several methods
mmcc@openbsd.org5e288922015-11-06 00:31:41 +000088(see below).
Damien Millere247cc42000-05-07 12:03:14 +100089.Pp
Darren Tucker61776952003-10-02 16:19:47 +100090If
91.Ar command
92is specified,
Darren Tuckerb18c8672005-12-20 16:10:09 +110093it is executed on the remote host instead of a login shell.
Darren Tucker0b42e6d2004-08-13 21:22:40 +100094.Pp
Damien Miller0bc1bd82000-11-13 22:57:25 +110095The options are as follows:
millert@openbsd.org79ec2142015-07-20 15:39:52 +000096.Pp
millert@openbsd.orgebe27eb2015-07-20 18:44:12 +000097.Bl -tag -width Ds -compact
Darren Tucker61776952003-10-02 16:19:47 +100098.It Fl 1
99Forces
100.Nm
101to try protocol version 1 only.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000102.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000103.It Fl 2
104Forces
105.Nm
106to try protocol version 2 only.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000107.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000108.It Fl 4
109Forces
110.Nm
111to use IPv4 addresses only.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000112.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000113.It Fl 6
114Forces
115.Nm
116to use IPv6 addresses only.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000117.Pp
Damien Millerb1715dc2000-05-30 13:44:51 +1000118.It Fl A
119Enables forwarding of the authentication agent connection.
120This can also be specified on a per-host basis in a configuration file.
Damien Millerb5fdfaa2002-09-12 09:52:03 +1000121.Pp
Damien Miller495dca32003-04-01 21:42:14 +1000122Agent forwarding should be enabled with caution.
123Users with the ability to bypass file permissions on the remote host
Darren Tuckerae69e1d2009-10-24 11:41:34 +1100124(for the agent's
Darren Tucker98c9aec2009-10-24 11:42:44 +1100125.Ux Ns -domain
126socket) can access the local agent through the forwarded connection.
Damien Miller495dca32003-04-01 21:42:14 +1000127An attacker cannot obtain key material from the agent,
Damien Millerb5fdfaa2002-09-12 09:52:03 +1000128however they can perform operations on the keys that enable them to
129authenticate using the identities loaded into the agent.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000130.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000131.It Fl a
132Disables forwarding of the authentication agent connection.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000133.Pp
Ben Lindstrome0f88042001-04-30 13:06:24 +0000134.It Fl b Ar bind_address
Darren Tuckera5cf8552005-07-14 17:04:18 +1000135Use
136.Ar bind_address
137on the local machine as the source address
138of the connection.
139Only useful on systems with more than one address.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000140.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000141.It Fl C
142Requests compression of all data (including stdin, stdout, stderr, and
Damien Millera8a0f652014-07-30 12:32:28 +1000143data for forwarded X11, TCP and
144.Ux Ns -domain
145connections).
Darren Tucker61776952003-10-02 16:19:47 +1000146The compression algorithm is the same used by
147.Xr gzip 1 ,
148and the
149.Dq level
150can be controlled by the
151.Cm CompressionLevel
152option for protocol version 1.
153Compression is desirable on modem lines and other
154slow connections, but will only slow down things on fast networks.
155The default value can be set on a host-by-host basis in the
156configuration files; see the
157.Cm Compression
158option.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000159.Pp
Damien Miller05202ff2004-06-15 10:30:39 +1000160.It Fl c Ar cipher_spec
161Selects the cipher specification for encrypting the session.
162.Pp
163Protocol version 1 allows specification of a single cipher.
Darren Tucker1e4308e2005-10-03 18:18:40 +1000164The supported values are
Damien Miller05202ff2004-06-15 10:30:39 +1000165.Dq 3des ,
Darren Tuckerff9f4842005-12-20 16:10:45 +1100166.Dq blowfish ,
Damien Miller05202ff2004-06-15 10:30:39 +1000167and
168.Dq des .
Damien Miller35978212005-12-24 14:56:47 +1100169For protocol version 2,
Damien Miller05202ff2004-06-15 10:30:39 +1000170.Ar cipher_spec
171is a comma-separated list of ciphers
172listed in order of preference.
Darren Tucker3a6a51f2009-06-21 17:48:52 +1000173See the
174.Cm Ciphers
Damien Miller081f3c72010-08-03 16:05:25 +1000175keyword in
176.Xr ssh_config 5
177for more information.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000178.Pp
Darren Tuckerc8d64212005-10-03 18:13:42 +1000179.It Fl D Xo
180.Sm off
181.Oo Ar bind_address : Oc
182.Ar port
183.Sm on
184.Xc
Darren Tucker61776952003-10-02 16:19:47 +1000185Specifies a local
186.Dq dynamic
187application-level port forwarding.
188This works by allocating a socket to listen to
189.Ar port
Darren Tuckerc8d64212005-10-03 18:13:42 +1000190on the local side, optionally bound to the specified
191.Ar bind_address .
192Whenever a connection is made to this port, the
Darren Tucker61776952003-10-02 16:19:47 +1000193connection is forwarded over the secure channel, and the application
194protocol is then used to determine where to connect to from the
195remote machine.
196Currently the SOCKS4 and SOCKS5 protocols are supported, and
197.Nm
198will act as a SOCKS server.
199Only root can forward privileged ports.
200Dynamic port forwardings can also be specified in the configuration file.
Darren Tuckerc8d64212005-10-03 18:13:42 +1000201.Pp
Damien Miller7fa96602010-08-05 13:03:13 +1000202IPv6 addresses can be specified by enclosing the address in square brackets.
Darren Tuckerc8d64212005-10-03 18:13:42 +1000203Only the superuser can forward privileged ports.
204By default, the local port is bound in accordance with the
205.Cm GatewayPorts
206setting.
207However, an explicit
208.Ar bind_address
209may be used to bind the connection to a specific address.
210The
211.Ar bind_address
212of
213.Dq localhost
214indicates that the listening port be bound for local use only, while an
215empty address or
216.Sq *
217indicates that the port should be available from all interfaces.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000218.Pp
Damien Miller03d4d7e2013-04-23 15:21:06 +1000219.It Fl E Ar log_file
220Append debug logs to
221.Ar log_file
222instead of standard error.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000223.Pp
Damien Miller2142ba02005-12-24 14:56:29 +1100224.It Fl e Ar escape_char
Damien Miller32aa1441999-10-29 09:15:49 +1000225Sets the escape character for sessions with a pty (default:
226.Ql ~ ) .
Damien Miller7684ee12000-03-17 23:40:15 +1100227The escape character is only recognized at the beginning of a line.
228The escape character followed by a dot
Damien Miller32aa1441999-10-29 09:15:49 +1000229.Pq Ql \&.
Darren Tucker61776952003-10-02 16:19:47 +1000230closes the connection;
231followed by control-Z suspends the connection;
232and followed by itself sends the escape character once.
Damien Miller7684ee12000-03-17 23:40:15 +1100233Setting the character to
Damien Miller32aa1441999-10-29 09:15:49 +1000234.Dq none
235disables any escapes and makes the session fully transparent.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000236.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000237.It Fl F Ar configfile
238Specifies an alternative per-user configuration file.
239If a configuration file is given on the command line,
240the system-wide configuration file
241.Pq Pa /etc/ssh/ssh_config
242will be ignored.
243The default for the per-user configuration file is
Damien Miller167ea5d2005-05-26 12:04:02 +1000244.Pa ~/.ssh/config .
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000245.Pp
Damien Miller32aa1441999-10-29 09:15:49 +1000246.It Fl f
247Requests
248.Nm
Damien Miller7684ee12000-03-17 23:40:15 +1100249to go to background just before command execution.
250This is useful if
Damien Miller32aa1441999-10-29 09:15:49 +1000251.Nm
252is going to ask for passwords or passphrases, but the user
Damien Miller7684ee12000-03-17 23:40:15 +1100253wants it in the background.
Damien Miller22c77262000-04-13 12:26:34 +1000254This implies
Damien Miller32aa1441999-10-29 09:15:49 +1000255.Fl n .
256The recommended way to start X11 programs at a remote site is with
257something like
258.Ic ssh -f host xterm .
Darren Tucker9a2a6092008-07-04 12:53:50 +1000259.Pp
260If the
261.Cm ExitOnForwardFailure
262configuration option is set to
263.Dq yes ,
264then a client started with
265.Fl f
266will wait for all remote port forwards to be successfully established
267before placing itself in the background.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000268.Pp
djm@openbsd.org957fbce2014-10-08 22:20:25 +0000269.It Fl G
270Causes
271.Nm
272to print its configuration after evaluating
273.Cm Host
274and
275.Cm Match
276blocks and exit.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000277.Pp
Damien Miller396691a2000-01-20 22:44:08 +1100278.It Fl g
279Allows remote hosts to connect to local forwarded ports.
Damien Miller49d9bfe2014-07-03 21:26:42 +1000280If used on a multiplexed connection, then this option must be specified
281on the master process.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000282.Pp
Damien Miller7ea845e2010-02-12 09:21:02 +1100283.It Fl I Ar pkcs11
Damien Millerd400da52010-02-12 09:26:23 +1100284Specify the PKCS#11 shared library
Darren Tucker61776952003-10-02 16:19:47 +1000285.Nm
Damien Millera7618442010-02-12 09:26:02 +1100286should use to communicate with a PKCS#11 token providing the user's
Darren Tucker61776952003-10-02 16:19:47 +1000287private RSA key.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000288.Pp
Damien Miller32aa1441999-10-29 09:15:49 +1000289.It Fl i Ar identity_file
Damien Millerfae23862002-01-22 23:32:26 +1100290Selects a file from which the identity (private key) for
Damien Millereb8b60e2010-08-31 22:41:14 +1000291public key authentication is read.
Damien Millerfae23862002-01-22 23:32:26 +1100292The default is
Damien Miller167ea5d2005-05-26 12:04:02 +1000293.Pa ~/.ssh/identity
Damien Millerfae23862002-01-22 23:32:26 +1100294for protocol version 1, and
Damien Millereb8b60e2010-08-31 22:41:14 +1000295.Pa ~/.ssh/id_dsa ,
Damien Miller8ba0ead2013-12-18 17:46:27 +1100296.Pa ~/.ssh/id_ecdsa ,
297.Pa ~/.ssh/id_ed25519
Damien Millerfae23862002-01-22 23:32:26 +1100298and
Damien Millereb8b60e2010-08-31 22:41:14 +1000299.Pa ~/.ssh/id_rsa
Damien Millerfae23862002-01-22 23:32:26 +1100300for protocol version 2.
Damien Miller7684ee12000-03-17 23:40:15 +1100301Identity files may also be specified on
302a per-host basis in the configuration file.
303It is possible to have multiple
Damien Miller32aa1441999-10-29 09:15:49 +1000304.Fl i
305options (and multiple identities specified in
306configuration files).
jmc@openbsd.orgc5f7c082015-09-25 18:19:54 +0000307If no certificates have been explicitly specified by the
djm@openbsd.org4e44a792015-09-24 06:15:11 +0000308.Cm CertificateFile
309directive,
Damien Miller5059d8d2010-03-05 21:31:11 +1100310.Nm
311will also try to load certificate information from the filename obtained
312by appending
313.Pa -cert.pub
314to identity filenames.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000315.Pp
djm@openbsd.orged877ef2016-07-15 00:24:30 +0000316.It Fl J Xo
317.Sm off
jmc@openbsd.orge4eb7d92016-07-16 06:57:55 +0000318.Op Ar user No @
319.Ar host
320.Op : Ar port
djm@openbsd.orged877ef2016-07-15 00:24:30 +0000321.Sm on
322.Xc
323Connect to the target host by first making a
324.Nm
jmc@openbsd.orge4eb7d92016-07-16 06:57:55 +0000325connection to the jump
326.Ar host
327and then establishing a TCP forwarding to the ultimate destination from
djm@openbsd.orged877ef2016-07-15 00:24:30 +0000328there.
329Multiple jump hops may be specified separated by comma characters.
330This is a shortcut to specify a
331.Cm ProxyJump
332configuration directive.
333.Pp
Darren Tucker415bddc2007-06-12 23:43:16 +1000334.It Fl K
335Enables GSSAPI-based authentication and forwarding (delegation) of GSSAPI
336credentials to the server.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000337.Pp
Damien Miller32aa1441999-10-29 09:15:49 +1000338.It Fl k
Damien Millere0113cc2003-11-24 13:10:09 +1100339Disables forwarding (delegation) of GSSAPI credentials to the server.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000340.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000341.It Fl L Xo
342.Sm off
Damien Millerf91ee4c2005-03-01 21:24:33 +1100343.Oo Ar bind_address : Oc
Darren Tucker61776952003-10-02 16:19:47 +1000344.Ar port : host : hostport
345.Sm on
346.Xc
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000347.It Fl L Xo
348.Sm off
349.Oo Ar bind_address : Oc
350.Ar port : remote_socket
351.Sm on
352.Xc
353.It Fl L Xo
354.Sm off
355.Ar local_socket : host : hostport
356.Sm on
357.Xc
358.It Fl L Xo
359.Sm off
360.Ar local_socket : remote_socket
361.Sm on
362.Xc
363Specifies that connections to the given TCP port or Unix socket on the local
364(client) host are to be forwarded to the given host and port, or Unix socket,
365on the remote side.
366This works by allocating a socket to listen to either a TCP
Darren Tucker61776952003-10-02 16:19:47 +1000367.Ar port
Damien Millerf91ee4c2005-03-01 21:24:33 +1100368on the local side, optionally bound to the specified
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000369.Ar bind_address ,
370or to a Unix socket.
371Whenever a connection is made to the local port or socket, the
Darren Tucker61776952003-10-02 16:19:47 +1000372connection is forwarded over the secure channel, and a connection is
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000373made to either
Darren Tucker61776952003-10-02 16:19:47 +1000374.Ar host
375port
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000376.Ar hostport ,
377or the Unix socket
378.Ar remote_socket ,
Darren Tucker61776952003-10-02 16:19:47 +1000379from the remote machine.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000380.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000381Port forwardings can also be specified in the configuration file.
Damien Millerf91ee4c2005-03-01 21:24:33 +1100382Only the superuser can forward privileged ports.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000383IPv6 addresses can be specified by enclosing the address in square brackets.
384.Pp
Damien Millerf91ee4c2005-03-01 21:24:33 +1100385By default, the local port is bound in accordance with the
386.Cm GatewayPorts
387setting.
388However, an explicit
389.Ar bind_address
390may be used to bind the connection to a specific address.
391The
392.Ar bind_address
393of
394.Dq localhost
Damien Miller36bf7dd2005-03-02 12:02:47 +1100395indicates that the listening port be bound for local use only, while an
396empty address or
397.Sq *
Damien Millerf91ee4c2005-03-01 21:24:33 +1100398indicates that the port should be available from all interfaces.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000399.Pp
Damien Miller32aa1441999-10-29 09:15:49 +1000400.It Fl l Ar login_name
Damien Miller7684ee12000-03-17 23:40:15 +1100401Specifies the user to log in as on the remote machine.
402This also may be specified on a per-host basis in the configuration file.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000403.Pp
Damien Miller0e220db2004-06-15 10:34:08 +1000404.It Fl M
405Places the
406.Nm
407client into
408.Dq master
409mode for connection sharing.
Damien Miller88b25522005-12-31 16:23:15 +1100410Multiple
411.Fl M
412options places
413.Nm
414into
415.Dq master
416mode with confirmation required before slave connections are accepted.
Damien Miller0e220db2004-06-15 10:34:08 +1000417Refer to the description of
418.Cm ControlMaster
419in
420.Xr ssh_config 5
421for details.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000422.Pp
Damien Miller5d1eceb2004-06-30 22:37:57 +1000423.It Fl m Ar mac_spec
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000424A comma-separated list of MAC (message authentication code) algorithms,
425specified in order of preference.
Damien Miller5d1eceb2004-06-30 22:37:57 +1000426See the
427.Cm MACs
428keyword for more information.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000429.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000430.It Fl N
431Do not execute a remote command.
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000432This is useful for just forwarding ports.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000433.Pp
Damien Miller32aa1441999-10-29 09:15:49 +1000434.It Fl n
435Redirects stdin from
436.Pa /dev/null
437(actually, prevents reading from stdin).
438This must be used when
439.Nm
Damien Miller7684ee12000-03-17 23:40:15 +1100440is run in the background.
441A common trick is to use this to run X11 programs on a remote machine.
442For example,
Damien Miller32aa1441999-10-29 09:15:49 +1000443.Ic ssh -n shadows.cs.hut.fi emacs &
444will start an emacs on shadows.cs.hut.fi, and the X11
445connection will be automatically forwarded over an encrypted channel.
446The
447.Nm
448program will be put in the background.
449(This does not work if
450.Nm
451needs to ask for a password or passphrase; see also the
452.Fl f
453option.)
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000454.Pp
Darren Tuckere04644c2004-12-03 14:08:45 +1100455.It Fl O Ar ctl_cmd
456Control an active connection multiplexing master process.
457When the
458.Fl O
459option is specified, the
460.Ar ctl_cmd
461argument is interpreted and passed to the master process.
462Valid commands are:
463.Dq check
Damien Miller388f6fc2010-05-21 14:57:35 +1000464(check that the master process is running),
465.Dq forward
Damien Miller8cb1cda2011-05-05 14:16:56 +1000466(request forwardings without command execution),
Damien Miller1bcbd0a2011-09-22 21:40:45 +1000467.Dq cancel
468(cancel forwardings),
Darren Tuckere04644c2004-12-03 14:08:45 +1100469.Dq exit
Damien Miller8cb1cda2011-05-05 14:16:56 +1000470(request the master to exit), and
Damien Miller6c3eec72011-05-05 14:16:22 +1000471.Dq stop
472(request the master to stop accepting further multiplexing requests).
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000473.Pp
Damien Miller32aa1441999-10-29 09:15:49 +1000474.It Fl o Ar option
Ben Lindstrom14c62eb2001-08-15 23:25:46 +0000475Can be used to give options in the format used in the configuration file.
Damien Miller32aa1441999-10-29 09:15:49 +1000476This is useful for specifying options for which there is no separate
Damien Miller7684ee12000-03-17 23:40:15 +1100477command-line flag.
Darren Tucker61776952003-10-02 16:19:47 +1000478For full details of the options listed below, and their possible values, see
479.Xr ssh_config 5 .
480.Pp
481.Bl -tag -width Ds -offset indent -compact
jcs@openbsd.orgf361df42015-11-15 22:26:49 +0000482.It AddKeysToAgent
Darren Tucker61776952003-10-02 16:19:47 +1000483.It AddressFamily
484.It BatchMode
485.It BindAddress
Damien Miller0faf7472013-10-17 11:47:23 +1100486.It CanonicalDomains
Damien Miller38505592013-10-17 11:48:13 +1100487.It CanonicalizeFallbackLocal
488.It CanonicalizeHostname
489.It CanonicalizeMaxDots
490.It CanonicalizePermittedCNAMEs
djm@openbsd.org4e44a792015-09-24 06:15:11 +0000491.It CertificateFile
Darren Tucker61776952003-10-02 16:19:47 +1000492.It ChallengeResponseAuthentication
493.It CheckHostIP
494.It Cipher
495.It Ciphers
496.It ClearAllForwardings
497.It Compression
498.It CompressionLevel
499.It ConnectionAttempts
Darren Tuckeredae0ec2004-05-02 22:15:52 +1000500.It ConnectTimeout
Damien Miller0e220db2004-06-15 10:34:08 +1000501.It ControlMaster
502.It ControlPath
Damien Millerefad7272011-09-22 21:33:53 +1000503.It ControlPersist
Darren Tucker61776952003-10-02 16:19:47 +1000504.It DynamicForward
Darren Tucker61776952003-10-02 16:19:47 +1000505.It EscapeChar
Darren Tuckere7d4b192006-07-12 22:17:10 +1000506.It ExitOnForwardFailure
jmc@openbsd.org8abd8032014-12-22 09:26:31 +0000507.It FingerprintHash
Darren Tucker61776952003-10-02 16:19:47 +1000508.It ForwardAgent
509.It ForwardX11
Damien Millerefad7272011-09-22 21:33:53 +1000510.It ForwardX11Timeout
Darren Tucker0a118da2003-10-15 15:54:32 +1000511.It ForwardX11Trusted
Darren Tucker61776952003-10-02 16:19:47 +1000512.It GatewayPorts
513.It GlobalKnownHostsFile
514.It GSSAPIAuthentication
515.It GSSAPIDelegateCredentials
Damien Millere1776152005-03-01 21:47:37 +1100516.It HashKnownHosts
Darren Tucker61776952003-10-02 16:19:47 +1000517.It Host
518.It HostbasedAuthentication
djm@openbsd.org46347ed2015-01-30 11:43:14 +0000519.It HostbasedKeyTypes
Darren Tucker61776952003-10-02 16:19:47 +1000520.It HostKeyAlgorithms
521.It HostKeyAlias
522.It HostName
jmc@openbsd.org772e6ce2016-06-29 17:14:28 +0000523.It IdentitiesOnly
markus@openbsd.orgb02ad1c2016-05-04 12:21:53 +0000524.It IdentityAgent
Darren Tucker61776952003-10-02 16:19:47 +1000525.It IdentityFile
djm@openbsd.orgdc7990b2016-04-15 00:30:19 +0000526.It Include
Damien Miller0a184732010-11-20 15:21:03 +1100527.It IPQoS
Damien Millerefad7272011-09-22 21:33:53 +1000528.It KbdInteractiveAuthentication
Darren Tucker636ca902004-11-05 20:22:00 +1100529.It KbdInteractiveDevices
Damien Miller7fe2b1f2010-09-24 22:11:53 +1000530.It KexAlgorithms
Damien Millerd27b9472005-12-13 19:29:02 +1100531.It LocalCommand
Darren Tucker61776952003-10-02 16:19:47 +1000532.It LocalForward
533.It LogLevel
534.It MACs
Damien Millerd77b81f2013-10-17 11:39:00 +1100535.It Match
Darren Tucker61776952003-10-02 16:19:47 +1000536.It NoHostAuthenticationForLocalhost
537.It NumberOfPasswordPrompts
538.It PasswordAuthentication
Damien Millerd27b9472005-12-13 19:29:02 +1100539.It PermitLocalCommand
Damien Miller7ea845e2010-02-12 09:21:02 +1100540.It PKCS11Provider
Darren Tucker61776952003-10-02 16:19:47 +1000541.It Port
542.It PreferredAuthentications
543.It Protocol
544.It ProxyCommand
djm@openbsd.orged877ef2016-07-15 00:24:30 +0000545.It ProxyJump
Damien Millerf2f6c312013-08-21 02:44:58 +1000546.It ProxyUseFdpass
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000547.It PubkeyAcceptedKeyTypes
Darren Tucker61776952003-10-02 16:19:47 +1000548.It PubkeyAuthentication
Darren Tucker62388b22006-01-20 11:31:47 +1100549.It RekeyLimit
Darren Tucker61776952003-10-02 16:19:47 +1000550.It RemoteForward
Damien Millerf4b32aa2011-05-15 08:47:43 +1000551.It RequestTTY
Darren Tucker61776952003-10-02 16:19:47 +1000552.It RhostsRSAAuthentication
553.It RSAAuthentication
Darren Tucker7a6c0662004-05-02 22:14:03 +1000554.It SendEnv
Damien Miller509b0102003-12-17 16:33:10 +1100555.It ServerAliveInterval
556.It ServerAliveCountMax
Damien Miller6d576562014-07-18 15:02:06 +1000557.It StreamLocalBindMask
558.It StreamLocalBindUnlink
Darren Tucker61776952003-10-02 16:19:47 +1000559.It StrictHostKeyChecking
Damien Miller12c150e2003-12-17 16:31:10 +1100560.It TCPKeepAlive
Damien Millerd27b9472005-12-13 19:29:02 +1100561.It Tunnel
562.It TunnelDevice
djm@openbsd.org1d1092b2015-01-26 12:16:36 +0000563.It UpdateHostKeys
Darren Tucker61776952003-10-02 16:19:47 +1000564.It UsePrivilegedPort
565.It User
566.It UserKnownHostsFile
567.It VerifyHostKeyDNS
Damien Miller86399202008-06-30 00:04:31 +1000568.It VisualHostKey
Darren Tucker61776952003-10-02 16:19:47 +1000569.It XAuthLocation
570.El
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000571.Pp
Damien Miller32aa1441999-10-29 09:15:49 +1000572.It Fl p Ar port
Damien Miller7684ee12000-03-17 23:40:15 +1100573Port to connect to on the remote host.
574This can be specified on a
Damien Miller32aa1441999-10-29 09:15:49 +1000575per-host basis in the configuration file.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000576.Pp
djm@openbsd.orgc0f55db2015-09-11 03:42:32 +0000577.It Fl Q Ar query_option
Damien Millerea111192013-04-23 19:24:32 +1000578Queries
579.Nm
Damien Millerd937dc02013-12-05 10:19:54 +1100580for the algorithms supported for the specified version 2.
581The available features are:
582.Ar cipher
Damien Millerea111192013-04-23 19:24:32 +1000583(supported symmetric ciphers),
Damien Millerd937dc02013-12-05 10:19:54 +1100584.Ar cipher-auth
Damien Miller0fde8ac2013-11-21 14:12:23 +1100585(supported symmetric ciphers that support authenticated encryption),
Damien Millerd937dc02013-12-05 10:19:54 +1100586.Ar mac
Damien Millerea111192013-04-23 19:24:32 +1000587(supported message integrity codes),
Damien Millerd937dc02013-12-05 10:19:54 +1100588.Ar kex
Damien Millerea111192013-04-23 19:24:32 +1000589(key exchange algorithms),
Damien Millerd937dc02013-12-05 10:19:54 +1100590.Ar key
djm@openbsd.orgc0f55db2015-09-11 03:42:32 +0000591(key types),
592.Ar key-cert
593(certificate key types),
594.Ar key-plain
595(non-certificate key types), and
djm@openbsd.org68d2dfc2015-03-03 06:48:58 +0000596.Ar protocol-version
597(supported SSH protocol versions).
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000598.Pp
Damien Miller32aa1441999-10-29 09:15:49 +1000599.It Fl q
Damien Miller7684ee12000-03-17 23:40:15 +1100600Quiet mode.
Damien Millereb602472008-02-10 22:21:28 +1100601Causes most warning and diagnostic messages to be suppressed.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000602.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000603.It Fl R Xo
604.Sm off
Damien Millerf91ee4c2005-03-01 21:24:33 +1100605.Oo Ar bind_address : Oc
Darren Tucker61776952003-10-02 16:19:47 +1000606.Ar port : host : hostport
607.Sm on
608.Xc
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000609.It Fl R Xo
610.Sm off
611.Oo Ar bind_address : Oc
612.Ar port : local_socket
613.Sm on
614.Xc
615.It Fl R Xo
616.Sm off
617.Ar remote_socket : host : hostport
618.Sm on
619.Xc
620.It Fl R Xo
621.Sm off
622.Ar remote_socket : local_socket
623.Sm on
624.Xc
625Specifies that connections to the given TCP port or Unix socket on the remote
626(server) host are to be forwarded to the given host and port, or Unix socket,
627on the local side.
628This works by allocating a socket to listen to either a TCP
Damien Miller32aa1441999-10-29 09:15:49 +1000629.Ar port
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000630or to a Unix socket on the remote side.
631Whenever a connection is made to this port or Unix socket, the
632connection is forwarded over the secure channel, and a connection
633is made to either
Damien Miller34132e52000-01-14 15:45:46 +1100634.Ar host
635port
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000636.Ar hostport ,
637or
638.Ar local_socket ,
Damien Miller7684ee12000-03-17 23:40:15 +1100639from the local machine.
Damien Millerf91ee4c2005-03-01 21:24:33 +1100640.Pp
Damien Miller7684ee12000-03-17 23:40:15 +1100641Port forwardings can also be specified in the configuration file.
642Privileged ports can be forwarded only when
Damien Miller32aa1441999-10-29 09:15:49 +1000643logging in as root on the remote machine.
Damien Miller70b2d552012-04-22 11:26:10 +1000644IPv6 addresses can be specified by enclosing the address in square brackets.
Damien Millerf91ee4c2005-03-01 21:24:33 +1100645.Pp
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000646By default, TCP listening sockets on the server will be bound to the loopback
Damien Millerf91ee4c2005-03-01 21:24:33 +1100647interface only.
Darren Tucker63917bd2008-11-11 16:33:48 +1100648This may be overridden by specifying a
Damien Millerf91ee4c2005-03-01 21:24:33 +1100649.Ar bind_address .
Damien Miller36bf7dd2005-03-02 12:02:47 +1100650An empty
651.Ar bind_address ,
Damien Millerf91ee4c2005-03-01 21:24:33 +1100652or the address
Damien Miller36bf7dd2005-03-02 12:02:47 +1100653.Ql * ,
Damien Millerf91ee4c2005-03-01 21:24:33 +1100654indicates that the remote socket should listen on all interfaces.
655Specifying a remote
656.Ar bind_address
Damien Miller36bf7dd2005-03-02 12:02:47 +1100657will only succeed if the server's
658.Cm GatewayPorts
Damien Millerf91ee4c2005-03-01 21:24:33 +1100659option is enabled (see
Damien Miller36bf7dd2005-03-02 12:02:47 +1100660.Xr sshd_config 5 ) .
Damien Millere2f4cc52009-02-14 16:33:49 +1100661.Pp
662If the
663.Ar port
664argument is
Damien Miller65fa4ca2009-02-14 16:34:05 +1100665.Ql 0 ,
Damien Millere2f4cc52009-02-14 16:33:49 +1100666the listen port will be dynamically allocated on the server and reported
667to the client at run time.
Damien Miller388f6fc2010-05-21 14:57:35 +1000668When used together with
669.Ic -O forward
670the allocated port will be printed to the standard output.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000671.Pp
Darren Tucker7ebfc102004-11-07 20:06:19 +1100672.It Fl S Ar ctl_path
Damien Miller67f30d72010-04-16 15:52:03 +1000673Specifies the location of a control socket for connection sharing,
Damien Miller9c60f242010-03-26 11:28:35 +1100674or the string
675.Dq none
676to disable connection sharing.
Damien Miller0e220db2004-06-15 10:34:08 +1000677Refer to the description of
Darren Tuckerba5c5922004-06-18 16:22:39 +1000678.Cm ControlPath
679and
Damien Miller0e220db2004-06-15 10:34:08 +1000680.Cm ControlMaster
681in
682.Xr ssh_config 5
683for details.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000684.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000685.It Fl s
686May be used to request invocation of a subsystem on the remote system.
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000687Subsystems facilitate the use of SSH
688as a secure transport for other applications (e.g.\&
Darren Tucker61776952003-10-02 16:19:47 +1000689.Xr sftp 1 ) .
690The subsystem is specified as the remote command.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000691.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000692.It Fl T
dtucker@openbsd.orgf8484da2015-05-06 05:45:17 +0000693Disable pseudo-terminal allocation.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000694.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000695.It Fl t
dtucker@openbsd.orgf8484da2015-05-06 05:45:17 +0000696Force pseudo-terminal allocation.
Darren Tucker61776952003-10-02 16:19:47 +1000697This can be used to execute arbitrary
698screen-based programs on a remote machine, which can be very useful,
Damien Miller208f1ed2006-03-15 11:56:03 +1100699e.g. when implementing menu services.
Darren Tucker61776952003-10-02 16:19:47 +1000700Multiple
701.Fl t
702options force tty allocation, even if
Ben Lindstrom19ceb172001-09-12 17:54:24 +0000703.Nm
Darren Tucker61776952003-10-02 16:19:47 +1000704has no local tty.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000705.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000706.It Fl V
707Display the version number and exit.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000708.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000709.It Fl v
710Verbose mode.
711Causes
Ben Lindstrom5ab6ae12001-02-10 22:08:03 +0000712.Nm
Darren Tucker61776952003-10-02 16:19:47 +1000713to print debugging messages about its progress.
714This is helpful in
715debugging connection, authentication, and configuration problems.
716Multiple
717.Fl v
718options increase the verbosity.
719The maximum is 3.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000720.Pp
Darren Tucker7ad8dd22010-01-12 19:40:27 +1100721.It Fl W Ar host : Ns Ar port
722Requests that standard input and output on the client be forwarded to
723.Ar host
724on
725.Ar port
726over the secure channel.
727Implies
728.Fl N ,
729.Fl T ,
730.Cm ExitOnForwardFailure
731and
jmc@openbsd.org6915f162016-06-03 06:44:12 +0000732.Cm ClearAllForwardings ,
733though these can be overridden in the configuration file or using
dtucker@openbsd.org0cb2f4c2016-06-03 04:09:38 +0000734.Fl o
735command line options.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000736.Pp
Damien Miller991dba42006-07-10 20:16:27 +1000737.It Fl w Xo
738.Ar local_tun Ns Op : Ns Ar remote_tun
739.Xc
740Requests
741tunnel
742device forwarding with the specified
Damien Millerd27b9472005-12-13 19:29:02 +1100743.Xr tun 4
Damien Miller991dba42006-07-10 20:16:27 +1000744devices between the client
745.Pq Ar local_tun
746and the server
747.Pq Ar remote_tun .
748.Pp
Damien Millercf1e3422005-12-24 14:56:04 +1100749The devices may be specified by numerical ID or the keyword
750.Dq any ,
751which uses the next available tunnel device.
Damien Miller991dba42006-07-10 20:16:27 +1000752If
753.Ar remote_tun
754is not specified, it defaults to
755.Dq any .
Damien Millercf1e3422005-12-24 14:56:04 +1100756See also the
Damien Millerd27b9472005-12-13 19:29:02 +1100757.Cm Tunnel
Damien Miller991dba42006-07-10 20:16:27 +1000758and
759.Cm TunnelDevice
760directives in
Damien Millerd27b9472005-12-13 19:29:02 +1100761.Xr ssh_config 5 .
Damien Miller991dba42006-07-10 20:16:27 +1000762If the
763.Cm Tunnel
764directive is unset, it is set to the default tunnel mode, which is
765.Dq point-to-point .
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000766.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000767.It Fl X
768Enables X11 forwarding.
769This can also be specified on a per-host basis in a configuration file.
770.Pp
771X11 forwarding should be enabled with caution.
772Users with the ability to bypass file permissions on the remote host
773(for the user's X authorization database)
774can access the local X11 display through the forwarded connection.
775An attacker may then be able to perform activities such as keystroke monitoring.
Damien Miller947219e2005-03-02 13:22:30 +1100776.Pp
Damien Millerb022b232005-03-05 11:22:36 +1100777For this reason, X11 forwarding is subjected to X11 SECURITY extension
Damien Miller947219e2005-03-02 13:22:30 +1100778restrictions by default.
779Please refer to the
780.Nm
781.Fl Y
782option and the
783.Cm ForwardX11Trusted
784directive in
785.Xr ssh_config 5
786for more information.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000787.Pp
Darren Tucker61776952003-10-02 16:19:47 +1000788.It Fl x
789Disables X11 forwarding.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000790.Pp
Darren Tucker0a118da2003-10-15 15:54:32 +1000791.It Fl Y
792Enables trusted X11 forwarding.
Damien Miller947219e2005-03-02 13:22:30 +1100793Trusted X11 forwardings are not subjected to the X11 SECURITY extension
794controls.
millert@openbsd.org79ec2142015-07-20 15:39:52 +0000795.Pp
Damien Millere272a5b2008-11-03 19:22:37 +1100796.It Fl y
797Send log information using the
798.Xr syslog 3
799system module.
800By default this information is sent to stderr.
Damien Miller32aa1441999-10-29 09:15:49 +1000801.El
Damien Millere9b333a2005-12-24 14:53:04 +1100802.Pp
803.Nm
804may additionally obtain configuration data from
805a per-user configuration file and a system-wide configuration file.
806The file format and configuration options are described in
807.Xr ssh_config 5 .
Damien Millerc93a8132005-12-24 14:52:13 +1100808.Sh AUTHENTICATION
Darren Tucker94299ec2006-01-20 11:30:14 +1100809The OpenSSH SSH client supports SSH protocols 1 and 2.
Darren Tucker7a4a7652009-10-11 21:51:40 +1100810The default is to use protocol 2 only,
811though this can be changed via the
Damien Millerc93a8132005-12-24 14:52:13 +1100812.Cm Protocol
813option in
Darren Tucker7a4a7652009-10-11 21:51:40 +1100814.Xr ssh_config 5
815or the
Damien Millerc93a8132005-12-24 14:52:13 +1100816.Fl 1
817and
818.Fl 2
819options (see above).
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000820Protocol 1 should not be used
821and is only offered to support legacy devices.
822It suffers from a number of cryptographic weaknesses
823and doesn't support many of the advanced features available for protocol 2.
Damien Millerc93a8132005-12-24 14:52:13 +1100824.Pp
825The methods available for authentication are:
Damien Millerfbc94c82006-06-13 13:03:16 +1000826GSSAPI-based authentication,
Damien Millerc93a8132005-12-24 14:52:13 +1100827host-based authentication,
828public key authentication,
829challenge-response authentication,
830and password authentication.
831Authentication methods are tried in the order specified above,
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000832though
833.Cm PreferredAuthentications
834can be used to change the default order.
Damien Millerc93a8132005-12-24 14:52:13 +1100835.Pp
836Host-based authentication works as follows:
Darren Tuckerd3877b92005-12-20 16:09:36 +1100837If the machine the user logs in from is listed in
838.Pa /etc/hosts.equiv
839or
840.Pa /etc/shosts.equiv
841on the remote machine, and the user names are
842the same on both sides, or if the files
843.Pa ~/.rhosts
844or
845.Pa ~/.shosts
846exist in the user's home directory on the
847remote machine and contain a line containing the name of the client
848machine and the name of the user on that machine, the user is
Damien Millerc93a8132005-12-24 14:52:13 +1100849considered for login.
850Additionally, the server
851.Em must
852be able to verify the client's
853host key (see the description of
Darren Tuckerd3877b92005-12-20 16:09:36 +1100854.Pa /etc/ssh/ssh_known_hosts
855and
Damien Millerc93a8132005-12-24 14:52:13 +1100856.Pa ~/.ssh/known_hosts ,
857below)
858for login to be permitted.
Darren Tuckerd3877b92005-12-20 16:09:36 +1100859This authentication method closes security holes due to IP
Damien Millerc93a8132005-12-24 14:52:13 +1100860spoofing, DNS spoofing, and routing spoofing.
Darren Tuckerd3877b92005-12-20 16:09:36 +1100861[Note to the administrator:
862.Pa /etc/hosts.equiv ,
863.Pa ~/.rhosts ,
864and the rlogin/rsh protocol in general, are inherently insecure and should be
865disabled if security is desired.]
866.Pp
Damien Millerc93a8132005-12-24 14:52:13 +1100867Public key authentication works as follows:
868The scheme is based on public-key cryptography,
869using cryptosystems
870where encryption and decryption are done using separate keys,
871and it is unfeasible to derive the decryption key from the encryption key.
Darren Tuckerd3877b92005-12-20 16:09:36 +1100872The idea is that each user creates a public/private
873key pair for authentication purposes.
874The server knows the public key, and only the user knows the private key.
Damien Millerc93a8132005-12-24 14:52:13 +1100875.Nm
876implements public key authentication protocol automatically,
sobrado@openbsd.orgf70b22b2014-08-30 15:33:50 +0000877using one of the DSA, ECDSA, Ed25519 or RSA algorithms.
Damien Millerfecfd112013-07-18 16:11:50 +1000878The HISTORY section of
Damien Millerc93a8132005-12-24 14:52:13 +1100879.Xr ssl 8
Damien Millerd4427902010-09-10 11:15:10 +1000880contains a brief discussion of the DSA and RSA algorithms.
Darren Tuckerd3877b92005-12-20 16:09:36 +1100881.Pp
882The file
883.Pa ~/.ssh/authorized_keys
884lists the public keys that are permitted for logging in.
885When the user logs in, the
886.Nm
887program tells the server which key pair it would like to use for
888authentication.
Damien Millerc93a8132005-12-24 14:52:13 +1100889The client proves that it has access to the private key
890and the server checks that the corresponding public key
891is authorized to accept the account.
Darren Tuckerd3877b92005-12-20 16:09:36 +1100892.Pp
Damien Millerc93a8132005-12-24 14:52:13 +1100893The user creates his/her key pair by running
Darren Tuckerd3877b92005-12-20 16:09:36 +1100894.Xr ssh-keygen 1 .
895This stores the private key in
896.Pa ~/.ssh/identity
Damien Millerc93a8132005-12-24 14:52:13 +1100897(protocol 1),
898.Pa ~/.ssh/id_dsa
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000899(DSA),
Damien Millereb8b60e2010-08-31 22:41:14 +1000900.Pa ~/.ssh/id_ecdsa
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000901(ECDSA),
Damien Miller8ba0ead2013-12-18 17:46:27 +1100902.Pa ~/.ssh/id_ed25519
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000903(Ed25519),
Damien Millerc93a8132005-12-24 14:52:13 +1100904or
905.Pa ~/.ssh/id_rsa
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000906(RSA)
Darren Tuckerd3877b92005-12-20 16:09:36 +1100907and stores the public key in
908.Pa ~/.ssh/identity.pub
Damien Millerc93a8132005-12-24 14:52:13 +1100909(protocol 1),
910.Pa ~/.ssh/id_dsa.pub
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000911(DSA),
Damien Millereb8b60e2010-08-31 22:41:14 +1000912.Pa ~/.ssh/id_ecdsa.pub
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000913(ECDSA),
Damien Miller8ba0ead2013-12-18 17:46:27 +1100914.Pa ~/.ssh/id_ed25519.pub
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000915(Ed25519),
Damien Millerc93a8132005-12-24 14:52:13 +1100916or
917.Pa ~/.ssh/id_rsa.pub
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000918(RSA)
Darren Tuckerd3877b92005-12-20 16:09:36 +1100919in the user's home directory.
Damien Millerc93a8132005-12-24 14:52:13 +1100920The user should then copy the public key
Darren Tuckerd3877b92005-12-20 16:09:36 +1100921to
922.Pa ~/.ssh/authorized_keys
Damien Millerc93a8132005-12-24 14:52:13 +1100923in his/her home directory on the remote machine.
924The
Darren Tuckerd3877b92005-12-20 16:09:36 +1100925.Pa authorized_keys
926file corresponds to the conventional
927.Pa ~/.rhosts
928file, and has one key
Damien Millerc93a8132005-12-24 14:52:13 +1100929per line, though the lines can be very long.
Darren Tuckerd3877b92005-12-20 16:09:36 +1100930After this, the user can log in without giving the password.
931.Pp
Damien Miller922b5412010-03-05 21:30:54 +1100932A variation on public key authentication
933is available in the form of certificate authentication:
934instead of a set of public/private keys,
935signed certificates are used.
936This has the advantage that a single trusted certification authority
937can be used in place of many public/private keys.
Damien Millerfecfd112013-07-18 16:11:50 +1000938See the CERTIFICATES section of
Damien Miller922b5412010-03-05 21:30:54 +1100939.Xr ssh-keygen 1
940for more information.
941.Pp
942The most convenient way to use public key or certificate authentication
943may be with an authentication agent.
Darren Tuckerd3877b92005-12-20 16:09:36 +1100944See
945.Xr ssh-agent 1
jcs@openbsd.orgf361df42015-11-15 22:26:49 +0000946and (optionally) the
947.Cm AddKeysToAgent
948directive in
949.Xr ssh_config 5
Darren Tuckerd3877b92005-12-20 16:09:36 +1100950for more information.
951.Pp
Damien Millerc93a8132005-12-24 14:52:13 +1100952Challenge-response authentication works as follows:
953The server sends an arbitrary
954.Qq challenge
955text, and prompts for a response.
Damien Millerc93a8132005-12-24 14:52:13 +1100956Examples of challenge-response authentication include
Damien Millerb7727df2013-08-21 02:43:49 +1000957.Bx
958Authentication (see
Damien Millerc93a8132005-12-24 14:52:13 +1100959.Xr login.conf 5 )
Damien Millerb7727df2013-08-21 02:43:49 +1000960and PAM (some
961.Pf non- Ox
962systems).
Damien Millerc93a8132005-12-24 14:52:13 +1100963.Pp
964Finally, if other authentication methods fail,
Darren Tuckerd3877b92005-12-20 16:09:36 +1100965.Nm
966prompts the user for a password.
967The password is sent to the remote
968host for checking; however, since all communications are encrypted,
969the password cannot be seen by someone listening on the network.
Damien Miller48c94ab2006-01-02 23:38:00 +1100970.Pp
971.Nm
972automatically maintains and checks a database containing
973identification for all hosts it has ever been used with.
974Host keys are stored in
975.Pa ~/.ssh/known_hosts
976in the user's home directory.
977Additionally, the file
978.Pa /etc/ssh/ssh_known_hosts
979is automatically checked for known hosts.
980Any new hosts are automatically added to the user's file.
981If a host's identification ever changes,
982.Nm
983warns about this and disables password authentication to prevent
984server spoofing or man-in-the-middle attacks,
985which could otherwise be used to circumvent the encryption.
986The
987.Cm StrictHostKeyChecking
988option can be used to control logins to machines whose
989host key is not known or has changed.
990.Pp
Darren Tuckerd3877b92005-12-20 16:09:36 +1100991When the user's identity has been accepted by the server, the server
dtucker@openbsd.orgf8484da2015-05-06 05:45:17 +0000992either executes the given command in a non-interactive session or,
993if no command has been specified, logs into the machine and gives
994the user a normal shell as an interactive session.
Darren Tuckerd3877b92005-12-20 16:09:36 +1100995All communication with
996the remote command or shell will be automatically encrypted.
997.Pp
dtucker@openbsd.orgf8484da2015-05-06 05:45:17 +0000998If an interactive session is requested
999.Nm
1000by default will only request a pseudo-terminal (pty) for interactive
1001sessions when the client has one.
1002The flags
1003.Fl T
1004and
1005.Fl t
1006can be used to override this behaviour.
1007.Pp
1008If a pseudo-terminal has been allocated the
Darren Tuckerd3877b92005-12-20 16:09:36 +11001009user may use the escape characters noted below.
1010.Pp
dtucker@openbsd.orgf8484da2015-05-06 05:45:17 +00001011If no pseudo-terminal has been allocated,
Darren Tuckerd3877b92005-12-20 16:09:36 +11001012the session is transparent and can be used to reliably transfer binary data.
1013On most systems, setting the escape character to
1014.Dq none
1015will also make the session transparent even if a tty is used.
1016.Pp
1017The session terminates when the command or shell on the remote
Damien Miller8bfaf932006-01-14 10:09:30 +11001018machine exits and all X11 and TCP connections have been closed.
Damien Miller52d20612005-12-24 14:52:36 +11001019.Sh ESCAPE CHARACTERS
Darren Tuckerd3877b92005-12-20 16:09:36 +11001020When a pseudo-terminal has been requested,
1021.Nm
1022supports a number of functions through the use of an escape character.
1023.Pp
1024A single tilde character can be sent as
1025.Ic ~~
1026or by following the tilde by a character other than those described below.
1027The escape character must always follow a newline to be interpreted as
1028special.
1029The escape character can be changed in configuration files using the
1030.Cm EscapeChar
1031configuration directive or on the command line by the
1032.Fl e
1033option.
1034.Pp
1035The supported escapes (assuming the default
1036.Ql ~ )
1037are:
1038.Bl -tag -width Ds
1039.It Cm ~.
1040Disconnect.
1041.It Cm ~^Z
1042Background
Damien Miller1164c292006-01-02 23:38:37 +11001043.Nm .
Darren Tuckerd3877b92005-12-20 16:09:36 +11001044.It Cm ~#
1045List forwarded connections.
1046.It Cm ~&
1047Background
1048.Nm
1049at logout when waiting for forwarded connection / X11 sessions to terminate.
1050.It Cm ~?
1051Display a list of escape characters.
1052.It Cm ~B
1053Send a BREAK to the remote system
jmc@openbsd.orga685ae82016-02-17 07:38:19 +00001054(only useful if the peer supports it).
Darren Tuckerd3877b92005-12-20 16:09:36 +11001055.It Cm ~C
1056Open command line.
1057Currently this allows the addition of port forwardings using the
Damien Miller0164cb82008-11-05 16:30:31 +11001058.Fl L ,
Darren Tuckerd3877b92005-12-20 16:09:36 +11001059.Fl R
Damien Miller0164cb82008-11-05 16:30:31 +11001060and
1061.Fl D
Damien Miller329cb012005-12-24 14:53:23 +11001062options (see above).
Damien Millerff773642011-09-22 21:39:48 +10001063It also allows the cancellation of existing port-forwardings
1064with
Damien Miller57e8ad32006-07-10 20:20:52 +10001065.Sm off
Damien Millerff773642011-09-22 21:39:48 +10001066.Fl KL Oo Ar bind_address : Oc Ar port
Damien Miller57e8ad32006-07-10 20:20:52 +10001067.Sm on
Damien Millerff773642011-09-22 21:39:48 +10001068for local,
1069.Sm off
1070.Fl KR Oo Ar bind_address : Oc Ar port
1071.Sm on
1072for remote and
1073.Sm off
1074.Fl KD Oo Ar bind_address : Oc Ar port
1075.Sm on
1076for dynamic port-forwardings.
Darren Tuckerd3877b92005-12-20 16:09:36 +11001077.Ic !\& Ns Ar command
1078allows the user to execute a local command if the
1079.Ic PermitLocalCommand
1080option is enabled in
1081.Xr ssh_config 5 .
1082Basic help is available, using the
1083.Fl h
1084option.
1085.It Cm ~R
1086Request rekeying of the connection
jmc@openbsd.orga685ae82016-02-17 07:38:19 +00001087(only useful if the peer supports it).
Darren Tucker50a48d02012-09-06 21:25:37 +10001088.It Cm ~V
1089Decrease the verbosity
1090.Pq Ic LogLevel
1091when errors are being written to stderr.
1092.It Cm ~v
Darren Tucker83d0af62012-09-07 11:21:03 +10001093Increase the verbosity
Darren Tucker50a48d02012-09-06 21:25:37 +10001094.Pq Ic LogLevel
1095when errors are being written to stderr.
Darren Tuckerd3877b92005-12-20 16:09:36 +11001096.El
Damien Millerf3177182006-01-14 10:09:13 +11001097.Sh TCP FORWARDING
1098Forwarding of arbitrary TCP connections over the secure channel can
1099be specified either on the command line or in a configuration file.
1100One possible application of TCP forwarding is a secure connection to a
1101mail server; another is going through firewalls.
1102.Pp
1103In the example below, we look at encrypting communication between
1104an IRC client and server, even though the IRC server does not directly
1105support encrypted communications.
1106This works as follows:
1107the user connects to the remote host using
1108.Nm ,
1109specifying a port to be used to forward connections
1110to the remote server.
1111After that it is possible to start the service which is to be encrypted
1112on the client machine,
1113connecting to the same local port,
1114and
1115.Nm
1116will encrypt and forward the connection.
1117.Pp
1118The following example tunnels an IRC session from client machine
1119.Dq 127.0.0.1
1120(localhost)
1121to remote server
1122.Dq server.example.com :
1123.Bd -literal -offset 4n
1124$ ssh -f -L 1234:localhost:6667 server.example.com sleep 10
1125$ irc -c '#users' -p 1234 pinky 127.0.0.1
1126.Ed
1127.Pp
1128This tunnels a connection to IRC server
1129.Dq server.example.com ,
1130joining channel
1131.Dq #users ,
1132nickname
1133.Dq pinky ,
1134using port 1234.
1135It doesn't matter which port is used,
1136as long as it's greater than 1023
1137(remember, only root can open sockets on privileged ports)
1138and doesn't conflict with any ports already in use.
1139The connection is forwarded to port 6667 on the remote server,
1140since that's the standard port for IRC services.
1141.Pp
1142The
1143.Fl f
1144option backgrounds
1145.Nm
1146and the remote command
1147.Dq sleep 10
1148is specified to allow an amount of time
1149(10 seconds, in the example)
1150to start the service which is to be tunnelled.
1151If no connections are made within the time specified,
1152.Nm
1153will exit.
Damien Millerf3177182006-01-14 10:09:13 +11001154.Sh X11 FORWARDING
Darren Tuckerd3877b92005-12-20 16:09:36 +11001155If the
1156.Cm ForwardX11
1157variable is set to
1158.Dq yes
1159(or see the description of the
Damien Millerd7f308f2005-12-24 14:55:16 +11001160.Fl X ,
1161.Fl x ,
Darren Tuckerd3877b92005-12-20 16:09:36 +11001162and
Damien Millerd7f308f2005-12-24 14:55:16 +11001163.Fl Y
Damien Miller9a765b22005-12-24 14:53:44 +11001164options above)
Darren Tuckerd3877b92005-12-20 16:09:36 +11001165and the user is using X11 (the
1166.Ev DISPLAY
1167environment variable is set), the connection to the X11 display is
1168automatically forwarded to the remote side in such a way that any X11
1169programs started from the shell (or command) will go through the
1170encrypted channel, and the connection to the real X server will be made
1171from the local machine.
1172The user should not manually set
1173.Ev DISPLAY .
1174Forwarding of X11 connections can be
1175configured on the command line or in configuration files.
1176.Pp
1177The
1178.Ev DISPLAY
1179value set by
1180.Nm
1181will point to the server machine, but with a display number greater than zero.
1182This is normal, and happens because
1183.Nm
1184creates a
1185.Dq proxy
1186X server on the server machine for forwarding the
1187connections over the encrypted channel.
1188.Pp
1189.Nm
1190will also automatically set up Xauthority data on the server machine.
1191For this purpose, it will generate a random authorization cookie,
1192store it in Xauthority on the server, and verify that any forwarded
1193connections carry this cookie and replace it by the real cookie when
1194the connection is opened.
1195The real authentication cookie is never
1196sent to the server machine (and no cookies are sent in the plain).
1197.Pp
1198If the
1199.Cm ForwardAgent
1200variable is set to
1201.Dq yes
1202(or see the description of the
1203.Fl A
1204and
1205.Fl a
Damien Miller9a765b22005-12-24 14:53:44 +11001206options above) and
Darren Tuckerd3877b92005-12-20 16:09:36 +11001207the user is using an authentication agent, the connection to the agent
1208is automatically forwarded to the remote side.
Damien Millerbbc59092006-01-31 21:46:51 +11001209.Sh VERIFYING HOST KEYS
1210When connecting to a server for the first time,
1211a fingerprint of the server's public key is presented to the user
1212(unless the option
1213.Cm StrictHostKeyChecking
1214has been disabled).
1215Fingerprints can be determined using
1216.Xr ssh-keygen 1 :
1217.Pp
1218.Dl $ ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key
1219.Pp
Darren Tuckerf6bffb12008-06-14 09:04:26 +10001220If the fingerprint is already known, it can be matched
1221and the key can be accepted or rejected.
djm@openbsd.orgf9487372015-05-22 05:28:45 +00001222If only legacy (MD5) fingerprints for the server are available, the
1223.Xr ssh-keygen 1
1224.Fl E
1225option may be used to downgrade the fingerprint algorithm to match.
1226.Pp
Darren Tuckerf6bffb12008-06-14 09:04:26 +10001227Because of the difficulty of comparing host keys
djm@openbsd.org56d1c832014-12-21 22:27:55 +00001228just by looking at fingerprint strings,
Darren Tuckerf6bffb12008-06-14 09:04:26 +10001229there is also support to compare host keys visually,
1230using
1231.Em random art .
1232By setting the
Damien Miller10288242008-06-30 00:04:03 +10001233.Cm VisualHostKey
Darren Tuckerf6bffb12008-06-14 09:04:26 +10001234option to
Damien Miller10288242008-06-30 00:04:03 +10001235.Dq yes ,
Darren Tuckerf6bffb12008-06-14 09:04:26 +10001236a small ASCII graphic gets displayed on every login to a server, no matter
1237if the session itself is interactive or not.
1238By learning the pattern a known server produces, a user can easily
1239find out that the host key has changed when a completely different pattern
1240is displayed.
1241Because these patterns are not unambiguous however, a pattern that looks
1242similar to the pattern remembered only gives a good probability that the
1243host key is the same, not guaranteed proof.
1244.Pp
1245To get a listing of the fingerprints along with their random art for
1246all known hosts, the following command line can be used:
1247.Pp
1248.Dl $ ssh-keygen -lv -f ~/.ssh/known_hosts
1249.Pp
Damien Millerbbc59092006-01-31 21:46:51 +11001250If the fingerprint is unknown,
1251an alternative method of verification is available:
1252SSH fingerprints verified by DNS.
1253An additional resource record (RR),
1254SSHFP,
1255is added to a zonefile
1256and the connecting client is able to match the fingerprint
1257with that of the key presented.
1258.Pp
1259In this example, we are connecting a client to a server,
1260.Dq host.example.com .
1261The SSHFP resource records should first be added to the zonefile for
1262host.example.com:
1263.Bd -literal -offset indent
Damien Millera1b3d632006-03-26 00:07:02 +11001264$ ssh-keygen -r host.example.com.
Damien Millerbbc59092006-01-31 21:46:51 +11001265.Ed
1266.Pp
1267The output lines will have to be added to the zonefile.
1268To check that the zone is answering fingerprint queries:
1269.Pp
1270.Dl $ dig -t SSHFP host.example.com
1271.Pp
1272Finally the client connects:
1273.Bd -literal -offset indent
1274$ ssh -o "VerifyHostKeyDNS ask" host.example.com
1275[...]
1276Matching host key fingerprint found in DNS.
1277Are you sure you want to continue connecting (yes/no)?
1278.Ed
1279.Pp
1280See the
1281.Cm VerifyHostKeyDNS
1282option in
1283.Xr ssh_config 5
1284for more information.
Darren Tucker248dd132006-01-20 11:30:58 +11001285.Sh SSH-BASED VIRTUAL PRIVATE NETWORKS
1286.Nm
1287contains support for Virtual Private Network (VPN) tunnelling
1288using the
1289.Xr tun 4
1290network pseudo-device,
1291allowing two networks to be joined securely.
1292The
1293.Xr sshd_config 5
1294configuration option
1295.Cm PermitTunnel
1296controls whether the server supports this,
1297and at what level (layer 2 or 3 traffic).
1298.Pp
1299The following example would connect client network 10.0.50.0/24
Damien Miller3975ee22006-11-05 05:31:33 +11001300with remote network 10.0.99.0/24 using a point-to-point connection
1301from 10.1.1.1 to 10.1.1.2,
1302provided that the SSH server running on the gateway to the remote network,
1303at 192.168.1.15, allows it.
1304.Pp
1305On the client:
Darren Tucker248dd132006-01-20 11:30:58 +11001306.Bd -literal -offset indent
1307# ssh -f -w 0:1 192.168.1.15 true
Damien Miller3975ee22006-11-05 05:31:33 +11001308# ifconfig tun0 10.1.1.1 10.1.1.2 netmask 255.255.255.252
1309# route add 10.0.99.0/24 10.1.1.2
1310.Ed
1311.Pp
1312On the server:
1313.Bd -literal -offset indent
1314# ifconfig tun1 10.1.1.2 10.1.1.1 netmask 255.255.255.252
1315# route add 10.0.50.0/24 10.1.1.1
Darren Tucker248dd132006-01-20 11:30:58 +11001316.Ed
1317.Pp
1318Client access may be more finely tuned via the
1319.Pa /root/.ssh/authorized_keys
1320file (see below) and the
1321.Cm PermitRootLogin
1322server option.
Damien Millere93eaaa2006-03-15 11:05:59 +11001323The following entry would permit connections on
Darren Tucker248dd132006-01-20 11:30:58 +11001324.Xr tun 4
Damien Millere93eaaa2006-03-15 11:05:59 +11001325device 1 from user
Darren Tucker248dd132006-01-20 11:30:58 +11001326.Dq jane
Damien Millere93eaaa2006-03-15 11:05:59 +11001327and on tun device 2 from user
Darren Tucker248dd132006-01-20 11:30:58 +11001328.Dq john ,
1329if
1330.Cm PermitRootLogin
1331is set to
1332.Dq forced-commands-only :
1333.Bd -literal -offset 2n
1334tunnel="1",command="sh /etc/netstart tun1" ssh-rsa ... jane
Damien Miller9f67a212006-03-15 11:05:35 +11001335tunnel="2",command="sh /etc/netstart tun2" ssh-rsa ... john
Darren Tucker248dd132006-01-20 11:30:58 +11001336.Ed
1337.Pp
Darren Tuckerffe88e12006-10-18 07:53:06 +10001338Since an SSH-based setup entails a fair amount of overhead,
Darren Tucker248dd132006-01-20 11:30:58 +11001339it may be more suited to temporary setups,
1340such as for wireless VPNs.
1341More permanent VPNs are better provided by tools such as
1342.Xr ipsecctl 8
1343and
1344.Xr isakmpd 8 .
Damien Miller32aa1441999-10-29 09:15:49 +10001345.Sh ENVIRONMENT
1346.Nm
1347will normally set the following environment variables:
Damien Miller6aa22902006-01-06 14:48:34 +11001348.Bl -tag -width "SSH_ORIGINAL_COMMAND"
Damien Miller32aa1441999-10-29 09:15:49 +10001349.It Ev DISPLAY
1350The
1351.Ev DISPLAY
Damien Miller7684ee12000-03-17 23:40:15 +11001352variable indicates the location of the X11 server.
Damien Miller22c77262000-04-13 12:26:34 +10001353It is automatically set by
Damien Miller32aa1441999-10-29 09:15:49 +10001354.Nm
1355to point to a value of the form
Damien Miller14af93e2006-01-02 23:38:21 +11001356.Dq hostname:n ,
1357where
1358.Dq hostname
1359indicates the host where the shell runs, and
1360.Sq n
1361is an integer \*(Ge 1.
Damien Miller7684ee12000-03-17 23:40:15 +11001362.Nm
1363uses this special value to forward X11 connections over the secure
1364channel.
Ben Lindstromc65e6a02001-04-23 13:02:16 +00001365The user should normally not set
1366.Ev DISPLAY
1367explicitly, as that
Damien Miller32aa1441999-10-29 09:15:49 +10001368will render the X11 connection insecure (and will require the user to
1369manually copy any required authorization cookies).
1370.It Ev HOME
1371Set to the path of the user's home directory.
1372.It Ev LOGNAME
1373Synonym for
1374.Ev USER ;
1375set for compatibility with systems that use this variable.
1376.It Ev MAIL
Ben Lindstrome59433d2001-09-12 16:41:37 +00001377Set to the path of the user's mailbox.
Damien Miller7684ee12000-03-17 23:40:15 +11001378.It Ev PATH
Damien Miller32aa1441999-10-29 09:15:49 +10001379Set to the default
1380.Ev PATH ,
1381as specified when compiling
Damien Miller1164c292006-01-02 23:38:37 +11001382.Nm .
Ben Lindstrom5bf5d672001-07-04 04:31:38 +00001383.It Ev SSH_ASKPASS
1384If
1385.Nm
1386needs a passphrase, it will read the passphrase from the current
1387terminal if it was run from a terminal.
1388If
1389.Nm
1390does not have a terminal associated with it but
1391.Ev DISPLAY
1392and
1393.Ev SSH_ASKPASS
1394are set, it will execute the program specified by
1395.Ev SSH_ASKPASS
1396and open an X11 window to read the passphrase.
1397This is particularly useful when calling
1398.Nm
1399from a
Darren Tucker4e4fe002004-11-05 20:01:03 +11001400.Pa .xsession
Ben Lindstrom5bf5d672001-07-04 04:31:38 +00001401or related script.
1402(Note that on some machines it
1403may be necessary to redirect the input from
1404.Pa /dev/null
1405to make this work.)
Damien Miller32aa1441999-10-29 09:15:49 +10001406.It Ev SSH_AUTH_SOCK
Damien Miller14af93e2006-01-02 23:38:21 +11001407Identifies the path of a
1408.Ux Ns -domain
1409socket used to communicate with the agent.
Damien Millerf37e2462002-09-19 11:47:55 +10001410.It Ev SSH_CONNECTION
1411Identifies the client and server ends of the connection.
Damien Miller7684ee12000-03-17 23:40:15 +11001412The variable contains
Damien Miller14af93e2006-01-02 23:38:21 +11001413four space-separated values: client IP address, client port number,
1414server IP address, and server port number.
Ben Lindstrom4dccfa52000-12-28 16:40:05 +00001415.It Ev SSH_ORIGINAL_COMMAND
Damien Miller14af93e2006-01-02 23:38:21 +11001416This variable contains the original command line if a forced command
Ben Lindstrom4dccfa52000-12-28 16:40:05 +00001417is executed.
1418It can be used to extract the original arguments.
Damien Miller32aa1441999-10-29 09:15:49 +10001419.It Ev SSH_TTY
1420This is set to the name of the tty (path to the device) associated
Damien Miller7684ee12000-03-17 23:40:15 +11001421with the current shell or command.
1422If the current session has no tty,
Damien Miller32aa1441999-10-29 09:15:49 +10001423this variable is not set.
1424.It Ev TZ
Damien Miller6dbdb6a2005-12-13 19:25:43 +11001425This variable is set to indicate the present time zone if it
Damien Miller208f1ed2006-03-15 11:56:03 +11001426was set when the daemon was started (i.e. the daemon passes the value
Damien Miller32aa1441999-10-29 09:15:49 +10001427on to new connections).
1428.It Ev USER
1429Set to the name of the user logging in.
1430.El
1431.Pp
Damien Miller22c77262000-04-13 12:26:34 +10001432Additionally,
Damien Miller32aa1441999-10-29 09:15:49 +10001433.Nm
Damien Miller22c77262000-04-13 12:26:34 +10001434reads
Damien Miller167ea5d2005-05-26 12:04:02 +10001435.Pa ~/.ssh/environment ,
Damien Miller32aa1441999-10-29 09:15:49 +10001436and adds lines of the format
1437.Dq VARNAME=value
Damien Miller14af93e2006-01-02 23:38:21 +11001438to the environment if the file exists and users are allowed to
Ben Lindstromdc7adf22002-08-20 18:38:02 +00001439change their environment.
Darren Tucker61776952003-10-02 16:19:47 +10001440For more information, see the
Ben Lindstromdc7adf22002-08-20 18:38:02 +00001441.Cm PermitUserEnvironment
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001442option in
Ben Lindstromdc7adf22002-08-20 18:38:02 +00001443.Xr sshd_config 5 .
Damien Miller32aa1441999-10-29 09:15:49 +10001444.Sh FILES
Damien Miller7655f5c2006-01-06 14:48:18 +11001445.Bl -tag -width Ds -compact
Damien Millerafdae612010-08-31 22:31:14 +10001446.It Pa ~/.rhosts
Damien Miller1bcdb502006-01-06 14:49:38 +11001447This file is used for host-based authentication (see above).
Ben Lindstromebd888d2001-03-05 05:49:29 +00001448On some machines this file may need to be
Damien Miller1bcdb502006-01-06 14:49:38 +11001449world-readable if the user's home directory is on an NFS partition,
Damien Miller32aa1441999-10-29 09:15:49 +10001450because
1451.Xr sshd 8
Damien Miller7684ee12000-03-17 23:40:15 +11001452reads it as root.
1453Additionally, this file must be owned by the user,
1454and must not have write permissions for anyone else.
1455The recommended
Damien Miller32aa1441999-10-29 09:15:49 +10001456permission for most machines is read/write for the user, and not
1457accessible by others.
1458.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001459.It Pa ~/.shosts
Damien Miller1bcdb502006-01-06 14:49:38 +11001460This file is used in exactly the same way as
1461.Pa .rhosts ,
1462but allows host-based authentication without permitting login with
1463rlogin/rsh.
Damien Miller7655f5c2006-01-06 14:48:18 +11001464.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001465.It Pa ~/.ssh/
Damien Miller520e6152008-02-10 22:46:22 +11001466This directory is the default location for all user-specific configuration
1467and authentication information.
1468There is no general requirement to keep the entire contents of this directory
1469secret, but the recommended permissions are read/write/execute for the user,
1470and not accessible by others.
1471.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001472.It Pa ~/.ssh/authorized_keys
sobrado@openbsd.orgf70b22b2014-08-30 15:33:50 +00001473Lists the public keys (DSA, ECDSA, Ed25519, RSA)
Damien Miller8ba0ead2013-12-18 17:46:27 +11001474that can be used for logging in as this user.
Damien Millerfb8ea742006-01-06 14:48:52 +11001475The format of this file is described in the
1476.Xr sshd 8
1477manual page.
Damien Millerfb8ea742006-01-06 14:48:52 +11001478This file is not highly sensitive, but the recommended
1479permissions are read/write for the user, and not accessible by others.
1480.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001481.It Pa ~/.ssh/config
Damien Millerfb8ea742006-01-06 14:48:52 +11001482This is the per-user configuration file.
1483The file format and configuration options are described in
1484.Xr ssh_config 5 .
1485Because of the potential for abuse, this file must have strict permissions:
Damien Millerd93340c2013-07-18 16:14:34 +10001486read/write for the user, and not writable by others.
Damien Millerfb8ea742006-01-06 14:48:52 +11001487.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001488.It Pa ~/.ssh/environment
Damien Miller4c102ee2006-01-06 14:49:17 +11001489Contains additional definitions for environment variables; see
1490.Sx ENVIRONMENT ,
Damien Millerfb8ea742006-01-06 14:48:52 +11001491above.
1492.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001493.It Pa ~/.ssh/identity
1494.It Pa ~/.ssh/id_dsa
Damien Millereb8b60e2010-08-31 22:41:14 +10001495.It Pa ~/.ssh/id_ecdsa
Damien Miller8ba0ead2013-12-18 17:46:27 +11001496.It Pa ~/.ssh/id_ed25519
Damien Millerafdae612010-08-31 22:31:14 +10001497.It Pa ~/.ssh/id_rsa
Damien Millerfb8ea742006-01-06 14:48:52 +11001498Contains the private key for authentication.
1499These files
1500contain sensitive data and should be readable by the user but not
1501accessible by others (read/write/execute).
1502.Nm
1503will simply ignore a private key file if it is accessible by others.
1504It is possible to specify a passphrase when
1505generating the key which will be used to encrypt the
1506sensitive part of this file using 3DES.
1507.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001508.It Pa ~/.ssh/identity.pub
1509.It Pa ~/.ssh/id_dsa.pub
Damien Millereb8b60e2010-08-31 22:41:14 +10001510.It Pa ~/.ssh/id_ecdsa.pub
Damien Miller8ba0ead2013-12-18 17:46:27 +11001511.It Pa ~/.ssh/id_ed25519.pub
Damien Millerafdae612010-08-31 22:31:14 +10001512.It Pa ~/.ssh/id_rsa.pub
Damien Millerfb8ea742006-01-06 14:48:52 +11001513Contains the public key for authentication.
1514These files are not
1515sensitive and can (but need not) be readable by anyone.
Damien Millerfb8ea742006-01-06 14:48:52 +11001516.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001517.It Pa ~/.ssh/known_hosts
Damien Millere87eb4c2006-01-14 10:08:36 +11001518Contains a list of host keys for all hosts the user has logged into
1519that are not already in the systemwide list of known host keys.
Damien Millerfb8ea742006-01-06 14:48:52 +11001520See
Damien Millere87eb4c2006-01-14 10:08:36 +11001521.Xr sshd 8
1522for further details of the format of this file.
Damien Millerfb8ea742006-01-06 14:48:52 +11001523.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001524.It Pa ~/.ssh/rc
Damien Millerfb8ea742006-01-06 14:48:52 +11001525Commands in this file are executed by
1526.Nm
Damien Miller7e76e1f2006-01-14 10:08:57 +11001527when the user logs in, just before the user's shell (or command) is
Damien Millerfb8ea742006-01-06 14:48:52 +11001528started.
1529See the
1530.Xr sshd 8
1531manual page for more information.
1532.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001533.It Pa /etc/hosts.equiv
Damien Miller1bcdb502006-01-06 14:49:38 +11001534This file is for host-based authentication (see above).
1535It should only be writable by root.
Damien Miller7655f5c2006-01-06 14:48:18 +11001536.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001537.It Pa /etc/shosts.equiv
Damien Miller1bcdb502006-01-06 14:49:38 +11001538This file is used in exactly the same way as
1539.Pa hosts.equiv ,
1540but allows host-based authentication without permitting login with
1541rlogin/rsh.
Damien Miller7655f5c2006-01-06 14:48:18 +11001542.Pp
Damien Millerfb8ea742006-01-06 14:48:52 +11001543.It Pa /etc/ssh/ssh_config
1544Systemwide configuration file.
1545The file format and configuration options are described in
1546.Xr ssh_config 5 .
1547.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001548.It Pa /etc/ssh/ssh_host_key
1549.It Pa /etc/ssh/ssh_host_dsa_key
Damien Millereb8b60e2010-08-31 22:41:14 +10001550.It Pa /etc/ssh/ssh_host_ecdsa_key
Damien Miller8ba0ead2013-12-18 17:46:27 +11001551.It Pa /etc/ssh/ssh_host_ed25519_key
Damien Millerafdae612010-08-31 22:31:14 +10001552.It Pa /etc/ssh/ssh_host_rsa_key
Damien Millerb9902cf2012-06-20 21:52:58 +10001553These files contain the private parts of the host keys
Damien Miller7e76e1f2006-01-14 10:08:57 +11001554and are used for host-based authentication.
Damien Millerfb8ea742006-01-06 14:48:52 +11001555.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001556.It Pa /etc/ssh/ssh_known_hosts
Damien Millerfb8ea742006-01-06 14:48:52 +11001557Systemwide list of known host keys.
1558This file should be prepared by the
1559system administrator to contain the public host keys of all machines in the
1560organization.
Damien Millere87eb4c2006-01-14 10:08:36 +11001561It should be world-readable.
1562See
Damien Millerfb8ea742006-01-06 14:48:52 +11001563.Xr sshd 8
Damien Millere87eb4c2006-01-14 10:08:36 +11001564for further details of the format of this file.
Damien Millerfb8ea742006-01-06 14:48:52 +11001565.Pp
Damien Millerafdae612010-08-31 22:31:14 +10001566.It Pa /etc/ssh/sshrc
Damien Miller32aa1441999-10-29 09:15:49 +10001567Commands in this file are executed by
1568.Nm
Damien Miller7e76e1f2006-01-14 10:08:57 +11001569when the user logs in, just before the user's shell (or command) is started.
Damien Miller32aa1441999-10-29 09:15:49 +10001570See the
1571.Xr sshd 8
1572manual page for more information.
Damien Miller7b28dc52000-09-05 13:34:53 +11001573.El
Damien Millerdaa7b222010-09-10 11:19:33 +10001574.Sh EXIT STATUS
1575.Nm
1576exits with the exit status of the remote command or with 255
1577if an error occurred.
Damien Miller32aa1441999-10-29 09:15:49 +10001578.Sh SEE ALSO
Damien Miller32aa1441999-10-29 09:15:49 +10001579.Xr scp 1 ,
Damien Miller33804262001-02-04 23:20:18 +11001580.Xr sftp 1 ,
Damien Miller32aa1441999-10-29 09:15:49 +10001581.Xr ssh-add 1 ,
1582.Xr ssh-agent 1 ,
1583.Xr ssh-keygen 1 ,
Damien Miller128a0f12006-01-06 14:50:11 +11001584.Xr ssh-keyscan 1 ,
Darren Tucker248dd132006-01-20 11:30:58 +11001585.Xr tun 4 ,
Ben Lindstrombf69e3b2002-06-23 00:31:24 +00001586.Xr ssh_config 5 ,
Ben Lindstromc001cd32002-06-23 00:32:11 +00001587.Xr ssh-keysign 8 ,
Ben Lindstrom5ab6ae12001-02-10 22:08:03 +00001588.Xr sshd 8
Darren Tucker628a3fd2012-10-05 10:50:15 +10001589.Sh STANDARDS
Ben Lindstrom160ec622001-04-22 17:17:46 +00001590.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001591.%A S. Lehtinen
1592.%A C. Lonvick
1593.%D January 2006
Damien Miller39a93a32006-03-15 11:34:45 +11001594.%R RFC 4250
Darren Tucker628a3fd2012-10-05 10:50:15 +10001595.%T The Secure Shell (SSH) Protocol Assigned Numbers
Damien Miller39a93a32006-03-15 11:34:45 +11001596.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001597.Pp
Damien Miller39a93a32006-03-15 11:34:45 +11001598.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001599.%A T. Ylonen
1600.%A C. Lonvick
1601.%D January 2006
Damien Miller39a93a32006-03-15 11:34:45 +11001602.%R RFC 4251
Darren Tucker628a3fd2012-10-05 10:50:15 +10001603.%T The Secure Shell (SSH) Protocol Architecture
Damien Miller39a93a32006-03-15 11:34:45 +11001604.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001605.Pp
Damien Miller39a93a32006-03-15 11:34:45 +11001606.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001607.%A T. Ylonen
1608.%A C. Lonvick
1609.%D January 2006
Damien Miller39a93a32006-03-15 11:34:45 +11001610.%R RFC 4252
Darren Tucker628a3fd2012-10-05 10:50:15 +10001611.%T The Secure Shell (SSH) Authentication Protocol
Damien Miller39a93a32006-03-15 11:34:45 +11001612.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001613.Pp
Damien Miller39a93a32006-03-15 11:34:45 +11001614.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001615.%A T. Ylonen
1616.%A C. Lonvick
1617.%D January 2006
Damien Miller39a93a32006-03-15 11:34:45 +11001618.%R RFC 4253
Darren Tucker628a3fd2012-10-05 10:50:15 +10001619.%T The Secure Shell (SSH) Transport Layer Protocol
Damien Miller39a93a32006-03-15 11:34:45 +11001620.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001621.Pp
Damien Miller39a93a32006-03-15 11:34:45 +11001622.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001623.%A T. Ylonen
1624.%A C. Lonvick
1625.%D January 2006
Damien Miller39a93a32006-03-15 11:34:45 +11001626.%R RFC 4254
Darren Tucker628a3fd2012-10-05 10:50:15 +10001627.%T The Secure Shell (SSH) Connection Protocol
Damien Miller39a93a32006-03-15 11:34:45 +11001628.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001629.Pp
Damien Miller39a93a32006-03-15 11:34:45 +11001630.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001631.%A J. Schlyter
1632.%A W. Griffin
1633.%D January 2006
Damien Miller39a93a32006-03-15 11:34:45 +11001634.%R RFC 4255
Darren Tucker628a3fd2012-10-05 10:50:15 +10001635.%T Using DNS to Securely Publish Secure Shell (SSH) Key Fingerprints
Damien Miller39a93a32006-03-15 11:34:45 +11001636.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001637.Pp
Damien Miller39a93a32006-03-15 11:34:45 +11001638.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001639.%A F. Cusack
1640.%A M. Forssen
1641.%D January 2006
Damien Miller39a93a32006-03-15 11:34:45 +11001642.%R RFC 4256
Darren Tucker628a3fd2012-10-05 10:50:15 +10001643.%T Generic Message Exchange Authentication for the Secure Shell Protocol (SSH)
Damien Miller39a93a32006-03-15 11:34:45 +11001644.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001645.Pp
Damien Miller39a93a32006-03-15 11:34:45 +11001646.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001647.%A J. Galbraith
1648.%A P. Remaker
1649.%D January 2006
Damien Miller39a93a32006-03-15 11:34:45 +11001650.%R RFC 4335
Darren Tucker628a3fd2012-10-05 10:50:15 +10001651.%T The Secure Shell (SSH) Session Channel Break Extension
Damien Miller39a93a32006-03-15 11:34:45 +11001652.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001653.Pp
Damien Miller39a93a32006-03-15 11:34:45 +11001654.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001655.%A M. Bellare
1656.%A T. Kohno
1657.%A C. Namprempre
1658.%D January 2006
Damien Miller39a93a32006-03-15 11:34:45 +11001659.%R RFC 4344
Darren Tucker628a3fd2012-10-05 10:50:15 +10001660.%T The Secure Shell (SSH) Transport Layer Encryption Modes
Damien Miller39a93a32006-03-15 11:34:45 +11001661.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001662.Pp
Damien Miller39a93a32006-03-15 11:34:45 +11001663.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001664.%A B. Harris
1665.%D January 2006
Damien Miller39a93a32006-03-15 11:34:45 +11001666.%R RFC 4345
Darren Tucker628a3fd2012-10-05 10:50:15 +10001667.%T Improved Arcfour Modes for the Secure Shell (SSH) Transport Layer Protocol
Ben Lindstrom160ec622001-04-22 17:17:46 +00001668.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001669.Pp
Damien Miller3e96d742006-03-25 23:39:29 +11001670.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001671.%A M. Friedl
1672.%A N. Provos
1673.%A W. Simpson
1674.%D March 2006
Damien Miller3e96d742006-03-25 23:39:29 +11001675.%R RFC 4419
Darren Tucker628a3fd2012-10-05 10:50:15 +10001676.%T Diffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer Protocol
Damien Miller3e96d742006-03-25 23:39:29 +11001677.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001678.Pp
Damien Millerc0367fb2007-01-05 16:25:46 +11001679.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001680.%A J. Galbraith
1681.%A R. Thayer
1682.%D November 2006
Damien Millerc0367fb2007-01-05 16:25:46 +11001683.%R RFC 4716
Darren Tucker628a3fd2012-10-05 10:50:15 +10001684.%T The Secure Shell (SSH) Public Key File Format
Damien Millerc0367fb2007-01-05 16:25:46 +11001685.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001686.Pp
Darren Tuckerf6bffb12008-06-14 09:04:26 +10001687.Rs
Darren Tucker628a3fd2012-10-05 10:50:15 +10001688.%A D. Stebila
1689.%A J. Green
1690.%D December 2009
Damien Miller1ca94692010-09-24 22:01:22 +10001691.%R RFC 5656
Darren Tucker628a3fd2012-10-05 10:50:15 +10001692.%T Elliptic Curve Algorithm Integration in the Secure Shell Transport Layer
Damien Miller1ca94692010-09-24 22:01:22 +10001693.Re
Darren Tucker628a3fd2012-10-05 10:50:15 +10001694.Pp
Damien Miller1ca94692010-09-24 22:01:22 +10001695.Rs
Darren Tuckerf6bffb12008-06-14 09:04:26 +10001696.%A A. Perrig
1697.%A D. Song
1698.%D 1999
Darren Tucker628a3fd2012-10-05 10:50:15 +10001699.%O International Workshop on Cryptographic Techniques and E-Commerce (CrypTEC '99)
1700.%T Hash Visualization: a New Technique to improve Real-World Security
Darren Tuckerf6bffb12008-06-14 09:04:26 +10001701.Re
Damien Millerf1ce5052003-06-11 22:04:39 +10001702.Sh AUTHORS
1703OpenSSH is a derivative of the original and free
1704ssh 1.2.12 release by Tatu Ylonen.
1705Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1706Theo de Raadt and Dug Song
1707removed many bugs, re-added newer features and
1708created OpenSSH.
1709Markus Friedl contributed the support for SSH
1710protocol versions 1.5 and 2.0.