<!doctype linuxdoc system>

<article>

<title>Ssh (Secure Shell) FAQ - Frequently asked questions
<author>by
<htmlurl name="Thomas K&ouml;nig"
url="http://www.uni-karlsruhe.de/~ig25/">
<htmlurl name="Thomas.Koenig@ciw.uni-karlsruhe.de"
url="mailto:Thomas.Koenig@ciw.uni-karlsruhe.de">
<date> $Date: 1997/06/06 20:14:08 $

<abstract> This document is a list of Frequently Asked Questions (plus
hopefully correct answers) about the Secure Shell, ssh.
</abstract>
<toc>
<sect>Meta-questions
<sect1>Where do I get this document?
<p>
The latest version of this document is available from
<tt><htmlurl url="index.html"
name="http://www.uni-karlsruhe.de/&tilde;ig25/ssh-faq/"</tt>. It will
also be posted, on a regular basis, to the Usenet newsgroups
comp.security.misc, comp.security.unix, sci.crypt, comp.answers, sci.answers
 and news.answers. This version is PGP-signed, and will be
available from
<tt><htmlurl
url="ftp://rtfm.mit.edu/pub/usenet/news.answers/computer-security/ssh-faq"
name="ftp://rtfm.mit.edu/pub/usenet/news.answers/computer-security/ssh-faq">
</tt>
and from
<tt><htmlurl
url="ssh-faq.faq"
name="http://www.uni-karlsruhe.de/&tilde;ig25/ssh-faq/ssh-faq.faq"></tt>.
<p>
The original SGML file is at
<tt><htmlurl url="ssh-faq.sgml"
name="http://www.uni-karlsruhe.de/&tilde;ig25/ssh-faq/ssh-faq.sgml"</tt>.
You can download a gzipped PostScript version from
<tt><htmlurl url="ssh-faq.ps.gz"
name="http://www.uni-karlsruhe.de/&tilde;ig25/ssh-faq/ssh-faq.ps.gz"></tt>.
<p>
If your link to Germany is slow, you might get better connectivity at
<tt><htmlurl url="http://aleph1.mit.edu/ssh-faq/"
name="http://aleph1.mit.edu/ssh-faq/">.</tt>
<p>
Also of interest is the ssh home page, at
<tt><htmlurl url="http://www.cs.hut.fi/ssh/"
name="http://www.cs.hut.fi/ssh/"></tt>.
<sect1>Where do I send questions, corrections etc. about this document?
<p>
Please send them to the maintainer,
<htmlurl url="mailto:Thomas.Koenig@ciw.uni-karlsruhe.de"
name="Thomas.Koenig@ciw.uni-karlsruhe.de"
<sect>Ssh basics
<p>
<sect1>What is ssh?
<p>
To quote the <tt/README/ file:
<p>
Ssh (Secure Shell) is a program to log into another computer over a
network, to execute commands in a remote machine, and to move files
from one machine to another. It provides strong authentication and
secure communications over unsecure channels. It is intended as a
replacement for rlogin, rsh, and rcp.
<p>
Additionally, ssh provides secure X connections and secure forwarding
of arbitrary TCP connections.
<sect1>Why should I use it?
<p>
The traditional BSD 'r' - commmands (rsh, rlogin, rcp) are vulnerable
to different kinds of attacks. Somebody who has root access to machines
on the network, or physical access to the wire, can gain unauthorized
access to systems in a variety of ways. It is also possible for such
a person to log all the traffic to and from your system, including
passwords (which ssh never sends in the clear).
<p>
The X Window System also has a number of severe vulnerabilities. With
ssh, you can create secure remote X sessions which are transparent to
the user. As a side effect, using remote X clients with ssh is more
convenient for users.
<p>
Users can continue to use old <tt>.rhosts</tt> and <tt>/etc/hosts.equiv</tt>
files; changing
over to ssh is mostly transparent for them. If a remote site
does not support ssh, a fallback mechanism to rsh is included.
<sect1>What kinds of attacks does ssh protect against?
<p>
Ssh protects against:
<itemize>
	<item>IP spoofing, where a remote host sends out packets which
		pretend to come from another, trusted host. Ssh even
		protects against a spoofer on the local network, who
		can pretend he is your router to the outside.
	<item>IP source routing, where a host can pretend that
		an IP packet comes from another, trusted host.
	<item>DNS spoofing, where an attacker forges name server
		records
	<item>Interception of cleartext passwords and other data by
		intermediate hosts.
	<item>Manipulation of data by people in control of
		intermediate hosts
	<item>Attacks based on listening to X authentication data
		and spoofed connection to the X11 server.
</itemize>
<p>
In other words, ssh never trusts the net; somebody hostile who has
taken over the network can only force ssh to disconnect, but
cannot decrypted or play back the traffic, or hijack the connection.
<p>
The above only holds if you actually use encryption. Ssh does
have an option to use encryption of type &dquot;none&dquot;
this is only for debugging purposes, and should not be used.
<sect1>What kind of attacks does ssh not protect against?
<p>
Ssh will not help you with anything that compromises your host's security
in some other way. Once an attacker has gained root access to a machine,
he can then subvert ssh, too.
<p>
If somebody malevolent has access to your home directory, then security is
nonexistent. This is very much the case if your home directory
is exported via NFS.
<sect1>How does it work?
<p>
For more extensive information, please refer to the <tt/README/
and <tt/RFC/ files in the ssh directory. The proposed RFC is also
available as an Internet Draft from
<tt><htmlurl name="ftp://ftp.ietf.org/internet-drafts/draft-ietf-tls-ssh-00.txt"
url="ftp://ftp.ietf.org/internet-drafts/draft-ietf-tls-ssh-00.txt">.</tt>
<p>
All communications are encrypted using IDEA or one of several other
ciphers (three-key triple-DES, DES, RC4-128, TSS,
Blowfish). Encryption keys are exchanged using RSA, and data used in
the key exchange is destroyed every hour (keys are not saved
anywhere). Every host has an RSA key which is used to authenticate the
host when RSA host authentication is used.  Encryption is used to
protect against IP-spoofing; public key authentication is used to
protect against DNS and routing spoofing.
<p>
RSA keys are also used to authenticate hosts.
<sect>Obtaining and installing ssh
<p>
<sect1>What is the latest version of ssh?
<p>
The latest officially released version is is 1.2.20.
<p>
Ssh currently runs on UNIX or related systems, plus under OS/2.
Ports have been successful to all &dquot;mainstream&dquot; UNIX systems.
There are two versions for MS-Windows. There is a free beta
version by Cedomir Igaly, which can be obtained from
<htmlurl name="http://public.srce.hr/~cigaly/ssh"
url="http://public.srce.hr/~cigaly/ssh"> or, preferably, from
a mirror at
<htmlurl name="ftp://hotline.pvt.net/pub/win_utils/winsock/ssh/"
url="ftp://hotline.pvt.net/pub/win_utils/winsock/ssh/">.

There's also
a commercial version by Tatu Yl&ouml;nen, the original author of ssh.
There's also a beta version for the Mac, available from Datafellows.
<sect1>May I legally run ssh?
<p>
The UNIX version of ssh 1.2.20 may be used and distributed freely, but
must not be sold commercially as a separate product, as part of a bigger
product or project, or otherwise used for financial gain without a separate
license.
<p>
Earlier versions of ssh had a less restrictive license; see the file
COPYING in the accompanying source distributions.
<p>
Tatu Yl&ouml;nen's MS-Windows version of ssh is a commercial product, which
requires licensing.
<p>
In some countries, particularly France, Russia, Iraq, and
Pakistan, it may be illegal to use any encryption at all without a special
permit.
<p>
If you are in the United States, you should be aware that, while
ssh was written outside the United States using information
publicly available everywhere, the US Government may
consider it a criminal offence to export this software from the US
once it has been imported, including putting it on a ftp site.
Contact the Office of Defence Trade Controls if you need more
information.
<p>
The algorithms RSA and IDEA, which are used by ssh, are claimed as
patented in different countries, including the US. Linking against the
RSAREF library, which is possible, may or may not make it legal to use
ssh for non-commercial purposes in the US. You may need to obtain licenses
for commercial use of IDEA; ssh can be configured to work without it.
Ssh works perfectly fine without IDEA, however.
<p>
For more detail, refer to the file <tt/COPYING/ in the ssh source
distribution.
<p>
For information on software patents in general, see the Leauge
for Programming Freedom's homepage at
<tt>
<htmlurl url="http://lpf.org/" name="http://lpf.org/"></tt>.
<p>
<sect1>
What about commercial use of ssh?
<p>
Ssh has been freely available in the Unix environment, and almost
certainly will remain to be so in future.
<p>
Tatu Yl&ouml;nen, the original author of ssh, has started a company, SSH
Communications Security Oy, that will provide commercial support and
licenses for ssh.  This company is working together with Data Fellows,
who are the sole contact for licensing ssh.  More information can be
found at
<tt>
<htmlurl url="http://www.europe.datafellows.com/"
name="http://www.europe.datafellows.com/">
</tt>
and
<tt>
<htmlurl url="http://www.ssh.fi/" name="http://www.ssh.fi/">.
</tt>
<sect1>Where can I obtain ssh?
<p>
The central site for distributing ssh is
<tt><htmlurl url="ftp://ftp.cs.hut.fi/pub/ssh/"
name="ftp://ftp.cs.hut.fi/pub/ssh/"></tt>.
<p>
Official releases are PGP-signed, with the key ID
<verb>
DCB9AE01 1995/04/24 Ssh distribution key <ylo@cs.hut.fi>
Key fingerprint =  C8 90 C8 5A 08 F0 F5 FD  61 AF E6 FF CF D4 29 D9 
</verb>
The latest development version is available from
<tt><htmlurl url="ftp://ftp.cs.hut.fi/pub/ssh/snapshots/"
name="ftp://ftp.cs.hut.fi/pub/ssh/snapshots/"></tt>.
<p>
Ssh is also available via anonymous ftp from the following sites:
<descrip>
<tag/Australia:/
<htmlurl url="ftp://coombs.anu.edu.au/pub/security/tools"
name="ftp://coombs.anu.edu.au/pub/security/tools">
<tag/Chile:/
<htmlurl url="ftp://ftp.inf.utfsm.cl/pub/security/ssh"
name="ftp://ftp.inf.utfsm.cl/pub/security/ssh">
<tag/Finland:/
<htmlurl url="ftp://ftp.funet.fi/pub/unix/security/login/ssh"
name="ftp://ftp.funet.fi/pub/unix/security/login/ssh">
<tag/Germany:/
<htmlurl url="ftp://ftp.cert.dfn.de/pub/tools/net/ssh"
name="ftp://ftp.cert.dfn.de/pub/tools/net/ssh">
<tag/Hungary:/
<htmlurl url="ftp://ftp.kfki.hu/pub/packages/security/ssh"
name="ftp://ftp.kfki.hu/pub/packages/security/ssh">
<tag/Ireland:/
<htmlurl url="ftp://odyssey.ucc.ie/pub/ssh"
name="ftp://odyssey.ucc.ie/pub/ssh">
<tag/Poland:/
<htmlurl url="ftp://ftp.agh.edu.pl/pub/security/ssh"
name="ftp://ftp.agh.edu.pl/pub/security/ssh">
<tag/Portugal:/
<htmlurl url="ftp://ftp.ci.uminho.pt/pub/security/ssh"
name="ftp://ftp.ci.uminho.pt/pub/security/ssh">
<tag/Russia:/
<htmlurl url="ftp://ftp.kiae.su/unix/crypto"
name="ftp://ftp.kiae.su/unix/crypto">
<tag/Slovenia:/
<htmlurl url="ftp://ftp.arnes.si/security/ssh"
name="ftp://ftp.arnes.si/security/ssh">
<tag/United Kingdom:/
<htmlurl url="ftp://ftp.exweb.com/pub/security/ssh"
name="ftp://ftp.exweb.com/pub/security/ssh">
<tag/United States:/
<htmlurl url="ftp://ftp.net.ohio-state.edu/pub/security/ssh"
name="ftp://ftp.net.ohio-state.edu/pub/security/ssh">
<tag/United States:/
<htmlurl url="ftp://ftp.gw.com/pub/unix/ssh"
name="ftp://ftp.gw.com/pub/unix/ssh">
</descrip>
Some mirrors may not have the most recent snapshots available.
<sect1>How do I install it?
<p>
Get the file from a site near you, then unpack it with
<verb>
gzip -c -d ssh-1.2.20.tar.gz | tar xvf -
</verb>
then change into the directory <tt/ssh-1.2.20/, read the
file <tt/INSTALL/, and follow the directions in it.
<sect1>Does it make sense to install ssh as non-root under UNIX?
<p>
You can install and run a <tt/ssh/ binary, which you can use to
log into another system on which <tt/sshd/ is running.
<p>
If you want to log in to the remote system without typing in your
password, you'll have to generate a private key in your home directory
using <tt/ssh-keygen/, then put your public key into
<tt>&dollar;HOME/.ssh/authorized_keys</tt>.
<p>
You can also start up <tt/sshd/ yourself as non-root, supplying
the <tt/-p/ option so it binds to a non-privileged port (&gt;1024),
and then connect from another system with <tt/ssh -p/.  This will
only allow connections to your own account, and <tt/sshd/ will, as
a rule, not be restarted when your machine reboots.
<p>
You will have to decide wether this is useful for you or not.
<p>
<sect1>Where do I get help?
<p>
First of all, read the documentation, this document :-)
and the ssh home page, at
<tt><htmlurl url="http://www.cs.hut.fi/ssh/"
name="http://www.cs.hut.fi/ssh/">.</tt>
<p>
For users, there is an introduction at
<tt><htmlurl url="http://www.tac.nyc.ny.us/~kim/ssh/"
name="http://www.tac.nyc.ny.us/~kim/ssh/">.</tt>
<p>
If these resources don't help, you can post to the Usenet
newsgroup <tt/comp.security.ssh/ or send mail to the
gatewayed mailing list for ssh users at <tt/ssh@clinet.fi/.
To subscribe, send mail to <tt/majordomo@clinet.fi/ with
<verb>
subscribe ssh
</verb>
in the body of the message.
<p>
Before subscribing, you might like to take a look at the archives
of the mailing list, at
<tt><htmlurl url="http://www.cs.hut.fi/ssh/ssh-archive"
name="http://www.cs.hut.fi/ssh/ssh-archive"</tt>.
<sect1>Are there any versions for other operating systems than UNIX?
<p>
Heikki Suonsivu (hsu@clinet.fi) and Michael Henits (moi@dio.com)
each offered a US&dollar; 100 reward for the first stable, freely
redistributable version for either MS-Windows or MacOS.
<p>
There was a preliminary version for MS-Windows by Cedomir Igaly.
Unfortunately, it does not appear to be available any more.
You can try out archie; look for the filename
<tt>ssh-1-2-.zip</tt>.
<p>
The commercial version by Tatu Yl&ouml;nen, the original author of
ssh, is available from
<tt>
<htmlurl url="http://www.europe.datafellows.com/f-secure/fssh-reg.htm"
name="http://www.europe.datafellows.com/f-secure/fssh-reg.htm">.
</tt>
<p>
Bernt.Budde@udac.uu.se is working on a Mac port.
<p>
A port to VMS, by Mark Martinec (Mark.Martinec@nsc.ijs.si), is being
worked on.
<p>
A port to OS/2 can be obtained from
<tt><htmlurl
url="ftp://ftp.cs.hut.fi/pub/ssh/os2/"
name="ftp://ftp.cs.hut.fi/pub/ssh/os2/">.</tt>
<p>
There is a special mailing list for the OS/2 version of ssh.
To subscribe, send mail to <tt/majordomo@clinet.fi/ with
<verb>
subscribe ssh-os2
</verb>
in the body of the message.
<sect1>What about administration of ssh?
<p>
The central problem of administering ssh is the management of
host keys.  To allow a client to connect to a remote host with
RSA host authentication, the server needs to know the client's
public key.
<p>
You can collect these automatically each night using either
<tt/make-ssh-known-hosts.pl/ (distributed with the ssh source
distribution) or with the much faster <tt/ssh-keyscan/, from
<tt><htmlurl name="ftp://cag.lcs.mit.edu/pub/dm/"
url="ftp://cag.lcs.mit.edu/pub/dm/"></tt> (also available from
<tt><htmlurl name="ftp://ftp.cs.hut.fi/ssh/contrib/"
url="ftp://ftp.cs.hut.fi/ssh/contrib/"></tt>).
<p>
Thomas K&ouml;nig has written a script to process output from one of
these utilities, check for new keys, warn about hosts which have
changed their keys (which could be an indication of a man in the
middle attack) and generate a complete new file.  This script is
available from
<tt><htmlurl name="http://www.uni-karlsruhe.de/~ig25/ssh-faq/comp-host-list"
url="comp-host-list"></tt>.
<p>
With these utilities, you can write scripts to verify public keys on a
regular basis.  When new machines are running ssh or people have changed
public keys, you may want to contact the people in question directly, to
make sure there were no man in the middle attacks (to which these
utilities are vulnerable).
<p>
A fingerprint scheme (equivalent to PGP fingerprints) has been
proposed to make this easier; it will probably be implemented in
the next release.
<sect>Ssh Applications
<p>
<sect1>Can I run backups over ssh?
<p>
Yes. Since ssh is a drop-in replacement for rsh, backup scripts
should continue to work. If you use rdist, see below.
<sect1>Should I turn encryption off, for performance reasons?
<p>
No; you should keep it turned on, for security reasons.
<p>
Today's CPUs are fast enough that performance losses (if any)
only are noticable for local Ethernet speeds, or faster.
<p>
You might want to specify
blowfish encryption instead of the default, IDEA, with <tt/-c blowfish/,
for faster operation.
<p>
Following are some measurements where the different
encryption methods were applied between a P5/90 and a 486/100,
both running Linux, for copying files with scp across a
lightly loaded Ethernet.
<p>
The model chosen was t=a+x/b; a is the startup time in seconds, and
b the sustainable transfer rate in kB/s. Also given are the 68.3%
confidence intervals for the data, as determined by the Levenberg-Marquardt
algorithm as implemented a pre-3.6 version of gnuplot.
<verb> 
Encryption      a[s]      da[s]    b[kB/s]      db[kB/s]
none            2.37       0.37     386.1         5.8
rc4             1.96       0.27     318.2         2.9
tss             2.33       0.37     298.5         3.5
des             2.07       0.19     218.8         1.0
idea            2.25       0.45     169.6         1.3
3des            1.92       0.11     118.2         0.2
</verb>
<p>
Across a heavily loaded Ethernet, rc4 encryption together
with compression may actually be faster than using rcp.
<p>
If you don't encrypt your sessions, you are vulnerable
to all the attacks which are open on the "r" suite of utilities,
and you might as well not use ssh.
<sect1>Can I use ssh to communicate across a firewall?
<p>
Yes; you can use TCP forwarding for that, by using its secure TCP
forwarding features.
<sect1>Can I use rdist with ssh?
<p>
Stock rdist 6.1.0 does not work together with ssh, due to
bugs in it.  The 6.1.1 versions of rdist and later versions
are believed to work.
<p>
If you use rdist, don't forget to compile the path to ssh into it.
Alternatively, you may specify the <tt/-P/ option so rdist uses
ssh, and not rsh.
<p>
If you use password authentication with rdist 6.1.2 or 6.1.3, you will
need to apply the following patch to rdist to make it work:
<verb>
--- src/rshrcmd.c.orig	Tue Jun 11 16:51:21 1996
+++ src/rshrcmd.c	Tue Jun 11 16:52:05 1996
@@ -63,7 +63,7 @@
 		/* child. we use sp[1] to be stdin/stdout, and close
 		   sp[0]. */
 		(void) close(sp[0]);
-		if (dup2(sp[1], 0) < 0 || dup2(0,1) < 0 || dup2(0, 2) < 0) {
+		if (dup2(sp[1], 0) < 0 || dup2(0,1) < 0) {
 			error("dup2 failed: %s.", SYSERR);
 			_exit(255);
 		}
<p>
</verb>
This also applies if you get a <tt>
&dquot;Warning: Denied agent forwarding
because the other end has too old version.&dquot;</tt> error (which occurs
if your client is 1.2.17 or later, and it connects to an older server).
<p>
Another alternative would be to use rsync, a rdist replacement, which
was designed to work with ssh, and makes better use of bandwidth. More
information can be found at
<htmlurl name="ftp://samba.anu.edu.au/pub/rsync"
url="ftp://samba.anu.edu.au/pub/rsync"> or
<htmlurl name="ftp://sunsite.auc.dk/pub/unix/rsync"
url="ftp://sunsite.auc.dk/pub/unix/rsync">.
<sect1>Can I use ssh to securely connect two subnets across the Internet?
<p>
You can run PPP over a regular ssh connection.
See <htmlurl name="http://www.inka.de/~bigred/sw/ssh-ppp-new.txt"
url="http://www.inka.de/~bigred/sw/ssh-ppp-new.txt">
for a working solution.  It's a good idea to enable compression for
this.
<p>
However, this may cause problems for forwarding TCP connections, because
both the TCP connection over which ssh runs and a TCP connection
forwarded over the PPP/ssh tunnel may retransmit at the same time.
In this case, it is better to use encrypted IP tunneling via UDP.
A possible implementation of this is
<htmlurl name="http://www.inka.de/~bigred/devel/cipe.html"
url="http://www.inka.de/~bigred/devel/cipe.html">.
<p>
<sect1>Can I use ssh to securely forward UDP-based services, such as NFS or NIS?
<p>
There is a general working solution for RPC-based services, such as
NIS.  You can download it from
<htmlurl name="ftp://ftp.tu-chemnitz.de/pub/Local/informatik/sec&lowbar;rpc/"
url="ftp://ftp.tu-chemnitz.de/pub/Local/informatik/sec&lowbar;rpc/">. NIS,
in particular, is working.
<p>
In principle, this could also be adapted for NFS; this has not been
done yet.
<p>
Services which are based purely on UDP, such as DNS, have not been
secured with ssh yet, although it is possible in principle.
<sect1>Can I forward SGI GL connections over ssh?
<p>
It is not likely that this will be implemented. GL uses a totally
different protocol from X, and at least gld would have to be
replaced.
<p>
OpenGL, when run as an X server extension, should pose no problem.
You may need to set the environment variable
<tt/GLFORCEDIRECT=no/.
<sect1>Can I use ssh to protect services like ftp or POP?
<p>
If you want to avoid sending ftp passwords in cleartext over the net, you
can use ssh to encrypt your command channel.  This will still leave
your data channel open to all attacks on TCP, and will not work through
a firewall.
<p>
Suppose you are on a host called myhost and want to initiate a ftp
connection to ftphost.  On myhost, you do
<verb>
myhost$ ssh -L 1234:ftphost.do.main:21 ftphost
</verb>
This logs you on to ftphost and also forwards connections to 1234 on
myhost to ftphost.
<p>
Then, in another window, you do
<verb>
myhost$ ftp mymachine 1234
220 ftphost FTP server (Foonix 08/15) ready.
Name: (myhost:yourname):
331 Password required for yourname
Password:
230 User yourname logged in.
</verb>
<p>
This works if the remote ftp daemon accepts <tt/PORT/ commands which specify
a different host from the one the command channel appears to come from,
and if the ftp client always uses <tt/PORT/.  This is true for vanilla UNIX
ftp client and ftpd servers; it may not work for more advanced
ftpds, such as wu-ftpd.
<p>
For servers which do not accept this, you can see wether you ftp
client supports passive mode, and wether the ftp server accepts
<tt/PASV/.
<p>
For POP, Stephane Bortzmeyer (bortzmeyer@pasteur.fr) has written a script
which protects the mail transfer and passwords ussing ssh.
It requires no modification to existing POP servers or clients, and
is available from
<tt><htmlurl name="ftp://ftp.pasteur.fr/pub/Network/gwpop/"
url="ftp://ftp.pasteur.fr/pub/Network/gwpop/"></tt>.
<p>
Other services could be secured by similar means.  Note, however, that
unencrypted ftp data connections are still vulnerable to session hijacking and
snooping.
<sect1>
Can I use ssh across a Socks firewall?
<p>
Socks 5 support should work in 1.2.16 or later.
<p>
<sect1>Is there ssh support for AFS/Kerberos?
<p>
At the moment, not in the main sources.  There's an AFS patch
available from
<tt>
<htmlurl name="http://www-personal.umich.edu/~dugsong/ssh-afs-kerberos.html"
url="http://www-personal.umich.edu/~dugsong/ssh-afs-kerberos.html">
</tt>
which should make it into the <tt/contrib/ directory shortly.
<sect>Problems
<p>
If you don't find your problem listed below, 
please submit a bug report to 
<tt><htmlurl name="ssh-bugs@clinet.fi" url="mailto:ssh-bugs@clinet.fi"></tt>
giving full details of
<itemize>
<item>Version number of ssh and (if different) sshd
<item>What you expected ssh to do
<item>What ssh did instead (including all error messages)
<item>The system you use (for example, the output of <tt/uname -a/), and
	the output of <tt/config.guess/.
<item>For a compilation problem, the contents of the file <tt/config.log/
	(generated by configure)
<item>The compiler you used, plus any compilation flags
<item>The output of <tt/ssh -v/
<item>The output of the sshd daemon when run in debug mode, as <tt/sshd -d/
</itemize>
Please try the latest snapshot from
<tt><htmlurl url="ftp://ftp.cs.hut.fi/pub/ssh/snapshots/"
name="ftp://ftp.cs.hut.fi/pub/ssh/snapshots/"></tt> before reporting
any bug.
<sect1>ssh otherhost xclient &amp; does not work!
<p>
No, it doesn't. Use &dquot;<tt/ssh -f otherhost xclient/&dquot; instead,
or &dquot;<tt/ssh -n otherhost xclient &amp;/&dquot; if you want a script
to be compatible with rsh.
<sect1>Ssh fails with "Resource temporarily unavailable" for Solaris
<p>
For Solaris 2.4, this s a kernel bug. Get the patch 101945-37 to fix it.
Please note that at least one earlier version, 101945-36, seems to have
reintroduced the bug.
<p>
If you experience the same problem with Solaris 2.5.1, upgrade to
ssh 1.2.14 or later, which should have solved the problem.
<sect1>Sshd hangs under Solaris 2.5!
<p>
This is a problem with the Solaris shared library code, which causes
a hang with some name server functions.
<p>
Get Patch 103187-02 (for x86, 103188-02) to fix this.  This problem
may or may not be fixed in Solaris 2.5.1.
<sect1>X11 forwarding does not work for an SCO binary with the iBCS2 emulator under Linux.
<p>
You need to set the hostname to the fully qualified domain name
for this to work. Some Linux distributions set the hostname
to the first part of the FQDN only.
<sect1>Ssh is doing wrong things for multi-homed hosts!
<p>
Check whether <tt/gethostbyname()/ really returns the complete lists
of possible IP addresses (you might, for example, have your system
configured to search <tt>/etc/hosts</tt> first, which might contain
only one of the IP addresses).
<sect1>Userid swapping is broken under AIX!
<p>
This is a bug in AIX 3.2.5, reported as APAR IX38941, and fixed by
patches U435001, U427862, U426915, and a few others. Contact your
IBM representative for details.
<sect1>ssh-keygen dumps core on Alpha OSF!
<p>
For Alpha OSF/1 1.3.2, this is due to a bug in the vendor-supplied
compiler with maximum optimization.
<p>
Turn off all optimization for ssh-keygen, or use gcc.  Gcc 2.7.2 is
known to have problems on the Alpha, however.
<sect1>ssh-keygen dumps core on Solaris or SunOS
<p>
This is a bug in gcc 2.7.0, which causes it to generated incorrect
code <em>without</em> optimization. Supply the &dquot;<tt/-O/&dquot; or
&dquot;<tt/-O -g/&dquot; options to gcc when compiling. Alternatively,
upgrade to gcc 2.7.2.
<sect1>On Linux, compilation aborts with some error message about libc.so.4
<p>
This is an incorrectly configured Linux system; do a
&dquot;<tt>cd /usr/lib; ln -s libc.sa libg.sa</tt>&dquot;
as root to remedy this.
<sect1>X authorization sometimes fails.
<p>
This is believed to be a bug in HP-UX 9 xauth, SR 5003209619. Patch
PHSS_5568 is believed to fix this problem.
<p>
If this occurs for any other platform, please mail details to
<tt> <htmlurl name="ssh-bugs@clinet.fi" url="mailto:ssh-bugs@clinet.fi">.</tt>
<sect1>Ssh asks me for passwords despite .rhosts!
<p>
There are several possibilities why this could be the case;
common ones include
<itemize>
<item>The client host key is not stored in the known_hosts
	file.  Note that this has to be the canonical (usually, the
	fully qualified) domain name.
<item>The client host does not
        have a reverse mapping in the name servers.
	Note that ssh requires that it has both a reverse mapping, and a
	forward mapping that contains the original IP address.
<item>A multi-homed client or host does not have all of its IP
        addresses listed in
	the DNS entry.  Note that versions prior to 1.2.12 have bugs in
	handling multi-homed hosts.
<item>	User's home directory or <tt>&tilde;/.rhosts</tt> is world or
	group-writable (see StrictModes server configuration option).
<item>	On some machines, if the home directory is on an NFS volume,
	<tt>&tilde;/.rhosts</tt> and your home directory may need to be
	world-readable.
<item>The root account has to use <tt>&tilde;/.rhosts</tt> or
	<tt>&tilde;/.shosts</tt>;
	<tt>/etc/shosts.equiv</tt> and <tt>/etc/hosts.equiv</tt> are
	disregarded for root.
<item>	Confusion between RhostsRSAAuthentication and RSAAuthentication.
<p>
	RhostsRSAAuthentication is a functional replacement for the 'r'
	utilities; this requires the <tt/ssh/ program to be setuid
	root, a secret key in <tt>/etc/host_key</tt> file on the client,
	a corresponding public key entry in <tt>/etc/ssh_known_hosts</tt>,
	plus entries in <tt>&tilde;/.[sr]hosts</tt> or
	<tt>/etc/[s]hosts.equiv</tt>.
<p>
	RSAAuthentication is done on a per-user basis and requires
	a <tt>&tilde;/.ssh/identity</tt> file on the client side
	(to be generated with <tt/ssh-keygen/), plus a matching
	<tt>&tilde;/.ssh/authorized_keys</tt> on the server side.
</itemize>
<sect1>Why does ssh loop with &dquot;Secure connection refused&quot;?
<p>
This is a configuration problem.
<p>
Ssh attempts to fall back to the "r" commands when it cannot connect to
an ssh daemon on the remote host.  It does this by execing your old rsh
to use the old protocol.
<p>
There are two possibilities why this could be:
<itemize>
<item>
You probably have installed ssh as rsh, and forgotten to give the
<tt>--with-rsh=PATH</tt> option to configure the second time.  When ssh
is looking for rsh, it keeps executing itself (or an older version of
itself).  To solve this, recompile ssh with the correct place for rsh.
<item>
You  moved the old rsh and rlogin into a different directory and
correctly are calling the old rsh.  The old rsh has a hard-coded
path to the old rlogin program, so you wind up execing the old rsh
which in turn execs the new replacement (ssh)rlogin.
<p>
In that case, you might want to move the old rsh and rlogin binaries into
<tt>/usr/old</tt>, patch the old rsh binary by running the Perl script
<verb>
perl -pi.orig -e 's+/usr/(bin|ucb)/rlogin+/usr/old/rlogin+g ;' /usr/old/rsh
</verb>
which will generate a patched version of rsh and save the old one in
<tt>/usr/old/rsh.orig</tt>.
<p>
Reconfigure ssh with <tt>--with-rsh=/usr/old/rsh</tt>.
</itemize>
<sect1>ssh-agent does not work with rxvt!
<p>
rxvt closes all file descriptors when starting up, including the one
used by <tt/ssh-agent/.  Use xterm, or look at the mailing list archives
at <tt><htmlurl url="http://www.cs.hut.fi/ssh/ssh-archive/"
name="http://www.cs.hut.fi/ssh/ssh-archive/"</tt> for Timo Rinne's
rxvt patch.
<sect1>X authorization always fails.
<p>
This can happen if the xauth program was not found at configure time.
Correct the path, reconfigure and recompile.
<sect1>ssh hangs when forwarding multiple TCP connections.
<p>
This is due to a known race condition in the ssh protocol before
1.2.13.
<p>
Some changes have been made to the protocol in 1.2.14 to prevent this.
Unfortunately, these changes may also cause hangs when using TCP forwarding
between 1.2.14 and earlier versions.  In these cases, upgrade to 1.2.14
or later at both ends is recommended.
<p>
<sect1>What does Warning: remote host denied X11 forwarding mean?
<p>
Either the remote end has disabled X11 forwarding (<tt/ForwardX11 No/
in the config file), or either the xauth command or the X11 libraries
were not found when compiling the server.
<p>
<sect1>I still see cleartext packages on the net when I run ssh!
<p>
It is very likely that you are looking at a telnet, rlogin or X
session to the machine that you run ssh on.  Check that those packets
really are ssh packets (for example by checking their port number;
sshd listens on port 22).
<sect1>I have problems with RSAREF, something to do with too many bits!
<p>
This is a limitation in the RSAREF library.  You should set a host
key with at most 896 bits.
<sect1>Compiling fails with some error messages from the assembler.
<p>
For several operating systems there were bugs in the gmp assembler routines.
Try
<verb>
make distclean
configure --disable-asm
</verb>
to compile.
<sect1>Compiling with Solaris 2.5 fails!
<p>
Set the CPP environment variable to &dquot;cc -E -Xs&dquot; before running
configure.
<sect1>Ssh suddenly drops connections!
<p>
This is a problem which has been reported by several people for SunOS 4,
Solaris 2, Linux, and HP-UX 9 and 10, with  1.2.16 and 1.2.17.  It happens
with scp,
when transferring large amounts of data via ssh's stdin, or when
forwarding an X connection which receives a large amount of graphics
data (such as a MPEG movie).
<p>
Try to apply the following patch to 1.2.16 or 1.2.17 for a fix.  This
is in 1.2.18 or later.
<verb>
--- serverloop.c.orig	Tue Jan 21 14:38:25 1997
+++ serverloop.c.	Tue Jan 21 14:37:54 1997
@@ -405,7 +405,7 @@
 		  buffer_len(&amp;stdin_buffer));
       if (len <= 0)
 	{
-	  if (errno != EWOULDBLOCK)
+	  if ((errno != EWOULDBLOCK) &amp;&amp; (errno != EAGAIN))
 	    {
 	      if (fdin == fdout)
 		shutdown(fdin, 1); /* We will no longer send. */
</verb>
<sect1>Connections are forwarded as root by ssh!
<p>
When a client connects, sshd forks a child that does the protocol
handling, and this child forks a second child for the user shell or
command. The problem is that the setuid() call to the correct user
appears only in the <em>second</em> child, so the first child keeps running
as root.
<p>
Among other potential problems this means that connections redirected
with -Lx:host:port will be made from the root uid to host:port, since
the <em>first</em> child does them.  This means that when the target
host does an ident query, it gets back only &dquot;root&dquot; and no
indication of the actual user.
<p>
This has been reported as a bug; it is not known wether this will be fixed
in a future release.
<sect>Miscellaneous
<p>
<sect1>What known security bugs exist in which versions of ssh?
<p>
All versions of ssh prior to 1.2.12.92 had a security flaw which
allowed local users to get access to the secret host key.  This is
fixed in 1.2.13 and later.
<p>
If you run ssh 1.2.13 on Alpha OSF 1.3 or SCO in C2 security mode, 
local users can gain root access.  This is fixed by applying
<tt>
<HTMLURL name="ftp://ftp.cs.hut.fi/pub/ssh/ssh-osf1-c2-setluid.patch"
URL="ftp://ftp.cs.hut.fi/pub/ssh/ssh-osf1-c2-setluid.patch"></tt>
or by upgrading to 1.2.14 or later.
<p>
Versions of ssh prior to 1.2.17 had problems with authentication agent
handling on some machines.  There is a chance (a race condition)
that a malicious user could steal another user's credentials.  This
should be fixed in 1.2.17.
<p>
The arcfour cipher is used in a way which makes it susceptible
in version 1 of the ssh protocol.  Therefore, its use has been disabled
in 1.2.18 and later.
<p>
<sect1>How widespread is use of ssh?
<p>
As with every piece of freely available software, this is difficult
to find out.  The best current estimates are that at least 1000
insitutions in 40 countries use it.  This estimate is based on
<itemize>
<item> The number of people on the ssh mailing list, around 600,
	from 40 different countries and several hundred domains
<item> Each week, the ssh home pages are accessed from roughly 5000
	different machines, many of them web caches; also, these
	machines often are different from week to week.
</itemize>
<p>
<sect1>I don't like the commercial aspects of ssh.
<p>
The protocols ssh uses are freely available.  There are no restrictions
if anybody wants to write a version that is available under different
conditions and is interoperable with existing ssh installations.
<p>
Ssh is also on the Internet Standards Track.  This means that a
second, independent implementation is required.
<p>
You will have to be aware of patent (RSA, IDEA) and export control
issues before writing a second implementation.
<sect1>Credits
<p>
Most of the credit, of course, goes to Tatu Yl&ouml;nen for writing ssh
and making it available to the public. I have also used parts of
his text from the documentation accompanying the ssh source
distribution. Thanks also for his corrections for this FAQ.
<p>
Also of invaluable help were corrections and additions from members
of the ssh mailing list and the Usenet newsgroups, by Mark Martinec,
Pedro Melo, Michael Soukas, Adrian Colley, Kenneth J. Hendrickson,
Adam Hammer, Olaf Titz, David Mazieres, Axel Boldt and Wayne Schroeder.
</article>
