HELP! sftp hangs on exit / Bug?

David Hawkins dwh at ovro.caltech.edu
Wed Apr 25 03:53:22 EST 2001


Hi,

The following discussion was posted to comp.security.ssh
however, it seems that my problems may be a bug in
SSH. Could someone please indicate whether there
is a bug fix, or perhaps whether I should go back a
version or so.

In summary:
- Win98 machine (client)
- OpenSSH as packaged with Cygwin tools 1.1.8
  (openssh-2.5.2p2-3)
- Connecting to a Sun running Solaris.

   ssh: SSH Secure Shell 2.4.0 (non-commercial version) on
sparc-sun-solaris2.7
   Copyright (c) 1995-2000 SSH Communications Security Corp (www.ssh.com)
   All rights reserved.  See LICENSE file for usage and distribution terms.

  All the key files have been converted appropriately.
   We have a similar setup running ok under Linux

- ssh works ok, scp works ok.
- sftp works ok during an interactive session (i.e., files can be
   moved to and from the remote machine)
- sftp hangs on exit. (see output below for sftp -v.)

I would have a look at the source code, but CVS also fails
to work. The ultimate goal here was to setup CVS (and WinCVS)
with ssh. The command line CVS (under Cygwin bash) transfers
files during a checkout, then hangs at the end. The WinCVS
tool just hangs after a checkout.

If I can be of assistance in running tests or providing more
information, please ask.

I have not subscribed to these lists, as I hope that once this
issue is resolved, I can simply use ssh as a tool. Please reply
to my email directly.

Thanks.

Dave Hawkins
Caltech.
dwh at ovro.caltech.edu

----- Original Message -----
From: "David Hawkins" <dwh at ovro.caltech.edu>
Newsgroups: comp.security.ssh
Sent: Tuesday, April 24, 2001 10:23 AM
Subject: Re: HELP! sftp hangs on exit / Bug?


>
> Thanks for this reference Dan, however, it did not help.
>
> From the FAQ:
> > Current versions of OpenSSH may hang when exiting. This can
> > occur when there is an active background process. This is known to
> > occur on Linux and HP-UX. The problem can be verified by doing
> > the following: sleep 20&exit.
> >
> > A work around for bash users is to place "shopt -s huponexit" in
> > either /etc/bashrc or ~/.bashrc. Otherwise, consult your shell's man
> > page for an option to enable it to send a HUP signal to active
> > jobs when exiting.
>
> I added 'shopt -s huponexit' to /etc/profile (since this
> is the file sourced by bash - I used an echo to confirm
> this), and also tried $HOME/.bashrc.
>
> In either case, sftp hung.
>
> I ssh'ed into inyo and called 'sleep 5& exit' and the shell
> exited back to my Cygwin bash shell without problems.
>
> So ... anyone else out there got suggestions?
>
> Regards,
> Dave Hawkins
>
>
> ----- Original Message -----
> From: "Daniel Barrett" <dbarrett at blazemonger.com>
> Newsgroups: comp.security.ssh
> To: <dwh at ovro.ovro.caltech.edu>
> Sent: Tuesday, April 24, 2001 9:09 AM
> Subject: Re: HELP! sftp hangs on exit / Bug?
>
>
> > In article <9c23r7$h56 at gap.cco.caltech.edu> you write:
> > >sftp hangs when I exit it.
> >
> > I think this is a known openssh bug.
> >
> > http://www.openssh.com/faq.html#3.10
> >
> >                                                         Dan
> >
> >
>
//////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
> > | Dan Barrett          dbarrett at blazemonger.com
> www.blazemonger.com |
> >
>
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////
>
>
>
> "David Hawkins" <dwh at ovro.caltech.edu> wrote in message
> news:9c23r7$h56 at gap.cco.caltech.edu...
> > Hi,
> >
> > I have ssh working for logins and scp working for
> > copying, however, sftp hangs when I exit it.
> > Here's my setup
> >
> > - Win98 machine (client)
> > - OpenSSH as packaged with Cygwin tools 1.1.8
> >   (openssh-2.5.2p2-3)
> > - Connecting to a Sun running Solaris. All the
> >    key files have been converted appropriately.
> >    We have a similar setup running ok under Linux.
> >
> > The Solaris machine is 'inyo', the local machine is
> > 'kiwi', and the user is dwh. I did the following from
> > the Cygwin bash command line ...
> >
> > > sftp -v inyo >& temp
> >
> > and typed exit to 'attempt' to leave sftp. However,
> > to get it to end I actually had to ctrl-c it. The
> > output file is included below. The connection
> > works fine, i.e., I don't have to use a password,
> > and files transfer ok. It's just that when try to exit
> > the process hangs.
> >
> > I am using SSH to access a CVS repository.
> > If I perform 'cvs checkout <module>' on a
> > module, then the files get copied to my local
> > machine, and then the process hangs after the
> > last file is correctly transferred.
> >
> > We have a similar setup to some Linux machines
> > and do not have these problems. Is this perhaps
> > a bug, or maybe the Cygnus bash shell and DOS
> > shells are not responding correctly.
> >
> > Can someone suggest how to get this up and running?
> > I'd be happy to run any tests anyone can suggest.
> >
> > Please reply to both the newsgroup and my email
> > address.
> >
> > Regards,
> >
> > Dave Hawkins
> > Caltech
> > dwh at ovro.caltech.edu
> >
> >
> >
> >  Connecting to inyo...
> > debug1: SSH args "ssh -v
> > inyo -s -oForwardX11=no -oForwardAgent=no -oProtocol=2 sftp"
> > OpenSSH_2.5.2p2, SSH protocols 1.5/2.0, OpenSSL 0x0090600f
> > debug1: Seeding random number generator
> > debug1: Rhosts Authentication disabled, originating port will not be
> > trusted.
> > debug1: ssh_connect: getuid 500 geteuid 500 anon 1
> > debug1: Connecting to inyo [192.100.16.7] port 22.
> > debug1: Connection established.
> > debug1: unknown identity file /cygdrive/f/.ssh/id_rsa
> > debug1: identity file /cygdrive/f/.ssh/id_rsa type -1
> > debug1: unknown identity file /cygdrive/f/.ssh/id_dsa
> > debug1: identity file /cygdrive/f/.ssh/id_dsa type -1
> > debug1: Remote protocol version 1.99, remote software version 2.4.0 SSH
> > Secure Shell (non-commercial)
> > debug1: match: 2.4.0 SSH Secure Shell (non-commercial) pat ^2\.[2-9]\.
> > Enabling compatibility mode for protocol 2.0
> > debug1: Local version string SSH-2.0-OpenSSH_2.5.2p2
> > debug1: send KEXINIT
> > debug1: done
> > debug1: wait KEXINIT
> > debug1: got kexinit: diffie-hellman-group1-sha1
> > debug1: got kexinit: ssh-dss
> > debug1: got kexinit:
> > 3des-cbc,cast128-cbc,blowfish-cbc,twofish-cbc,arcfour,none
> > debug1: got kexinit:
> > 3des-cbc,cast128-cbc,blowfish-cbc,twofish-cbc,arcfour,none
> > debug1: got kexinit: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,none
> > debug1: got kexinit: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,none
> > debug1: got kexinit: none,zlib
> > debug1: got kexinit: none,zlib
> > debug1: got kexinit:
> > debug1: got kexinit:
> > debug1: first kex follow: 0
> > debug1: reserved: 0
> > debug1: done
> > debug1: kex: server->client 3des-cbc hmac-md5 none
> > debug1: kex: client->server 3des-cbc hmac-md5 none
> > debug1: Sending SSH2_MSG_KEXDH_INIT.
> > debug1: dh_gen_key: priv key bits set: 179/384
> > debug1: bits set: 532/1024
> > debug1: Wait SSH2_MSG_KEXDH_REPLY.
> > debug1: Got SSH2_MSG_KEXDH_REPLY.
> > debug1: Host 'inyo' is known and matches the DSA host key.
> > debug1: Found key in /cygdrive/f/.ssh/known_hosts2:1
> > debug1: bits set: 518/1024
> > debug1: len 55 datafellows 0
> > debug1: ssh_dss_verify: signature correct
> > debug1: Wait SSH2_MSG_NEWKEYS.
> > debug1: GOT SSH2_MSG_NEWKEYS.
> > debug1: send SSH2_MSG_NEWKEYS.
> > debug1: done: send SSH2_MSG_NEWKEYS.
> > debug1: done: KEX2.
> > debug1: send SSH2_MSG_SERVICE_REQUEST
> > debug1: service_accept: ssh-userauth
> > debug1: got SSH2_MSG_SERVICE_ACCEPT
> > debug1: authentications that can continue: publickey,password
> > debug1: next auth method to try is publickey
> > debug1: try privkey: /cygdrive/f/.ssh/id_rsa
> > debug1: try privkey: /cygdrive/f/.ssh/id_dsa
> > debug1: read SSH2 private key done: name dsa w/o comment success 1
> > debug1: sig size 20 20
> > debug1: ssh-userauth2 successful: method publickey
> > debug1: fd 4 setting O_NONBLOCK
> > debug1: fd 5 setting O_NONBLOCK
> > debug1: fd 6 setting O_NONBLOCK
> > debug1: channel 0: new [client-session]
> > debug1: send channel open 0
> > debug1: Entering interactive session.
> > debug1: client_init id 0 arg 0
> > debug1: Sending subsystem: sftp
> > debug1: channel 0: open confirm rwindow 10000 rmax 32768
> > sftp> sftp> Killed by signal 2.
> > debug1: Calling cleanup 0x416e08(0x0)
> > debug1: Calling cleanup 0x41a304(0x0)
> >
> >
> >
>
>




More information about the openssh-unix-dev mailing list