[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#241119: ssh-keyscan exits upon failure of single acquisition



Package: ssh
Version: 1:3.6.1p2-10
Severity: normal

I am using ssh-keyscan to acquire the host keys for a large number of
hosts.  This program is supposed to speed up the process by running many
ssh connections in parallel.  However, if any of the ssh connections
gets severed, the entire program exits without giving the other
connections a chance to produce information.  

Example:

> ssh-keyscan -t dsa -f <file with many hosts>
  (lots of results)
  # <ip> SSH-2.0-OpenSSH_3.6.1p2 Debian 1:3.6.1p2-10
  Connection closed by <ip>

This "Connection closed by" error comes from packet.c:884.  It is the
exact same error that occurs if I try to manually ssh to this ip.  I do
not know why the ssh connection fails (directly after SSH2_MSG_KEXINIT
sent), but ssh-keyscan should not exit simply because one of the ssh
connections fails; it should try to acquire as much information as
possible.

I believe the root of the problem is that the ssh package has a call to
cleanup_exit() in what is used effectively as library code within the 
project.  In this occasion, this call is made in the non-fatal situation
of a single ssh connection failing, which means the program should be
allowed to continue.

I have no suggestion for how to fix this bug because other programs
within the package may rely on the program exiting in this situation.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux simoom 2.4.24cs.k7.1 #1 Wed Jan 21 11:39:29 EST 2004 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages ssh depends on:
ii  adduser                     3.51         Add and remove users and groups
ii  debconf                     1.3.22       Debian configuration management sy
ii  dpkg                        1.10.18      Package maintenance system for Deb
ii  libc6                       2.3.2.ds1-10 GNU C Library: Shared libraries an
ii  libpam-modules              0.76-14.1    Pluggable Authentication Modules f
ii  libpam-runtime              0.76-14.1    Runtime support for the PAM librar
ii  libpam0g                    0.76-14.1    Pluggable Authentication Modules l
ii  libssl0.9.7                 0.9.7c-5     SSL shared libraries
ii  libwrap0                    7.6-ipv6.1-3 Wietse Venema's TCP wrappers libra
ii  zlib1g                      1:1.2.1-3    compression library - runtime

-- debconf-show failed





Reply to: