openssh-2.3.0p1-1 with RedHat 6.2 - Bad packet length

Rob Hagopian rob at hagopian.net
Tue Nov 14 05:55:51 EST 2000


Hehe... I did totally remove the commercial ssh beforehand... All client
machines are running the last snapshot before 2.3.0p1 and the server
machine is running 2.3.0p1 (BTW: this setup still has an occasional
hanging problem).

The funny thing is, I went to double check with:
$ for i in `cat *`; do
> ssh ${i} ls /usr/local/bin/scp
> done

and got this as output:
select: Bad file descriptor
select: Bad file descriptor
select: Bad file descriptor
select: Bad file descriptor
select: Bad file descriptor
select: Bad file descriptor
ls: select: Bad file descriptor
select: Bad file descriptor
ls: select: Bad file descriptor

etc, etc, etc...

So I do another test:
$ ssh dhcorp301 ls
1
$ ssh dhcorp301 ls asdf
select: Bad file descriptor

Ah... ls will print to stderr if it can't find the file...

Considering how long debug output is, I'll append it to the end of this
email (after the included quotes). If server output is needed let me
know...
								-Rob

On Mon, 13 Nov 2000, Robert Steinfeldt wrote:

> Rob Hagopian wrote:
> 
> > FYI, I get 'select: Bad file descriptor' even when scp is in the path,
> > right before the copy starts...
> > 								-Rob
> 
> I had this problem when I upgraded a series of RedHat 6.1 and 6.2 
> machines from OpenSSH 2.2.0* to 2.3.0p1.[1] Even /with/ the correct 
> OpenSSH scp in the path before any other scp might be called, I was 
> having the general problems you're describing when I tried to copy TO a 
> machine that had had ssh.com's ssh installed in the /usr/local tree.[2] 
> What I did to make the problem stop was to completely remove the ssh.com 
> installation in /usr/local on the side being copied to.
> 
> It appears that the problem emerged with the upgrade to OpenSSH 2.3.0, 
> since I'd done scp transfers between the machines when they ran OpenSSH 
> 2.2.0, without a problem. This may not be the issue you're seeing, but 
> it's worth a try.
> 
> Robert Steinfeldt -- robert.steinfeldt at steeleye.com
> 
> [1] - In both cases, I was using the provided Redhat RPMs available from 
> openssh.com.
> [2] - I used to have the noncommercial ssh.com version run from inetd, 
> and when I originally upgraded to OpenSSH, simply commented out that 
> line and let OpenSSH run sshd from /etc/rc.d/init.d. The old 
> installation just sat where it was.
> 
> > 
> > On Thu, 9 Nov 2000, Peter Stuge wrote:
> > 
> > 
> >> On Wed, Nov 08, 2000 at 11:06:30AM -0700, James wrote:
> >> 
> >>> I haven't been able to get scp to work with RedHat 6.2 (select: Bad file
> >>> descriptor), so...  I tried upgrading with openssh-2.3.0p1-1.src.rpm and
> >>> openssl-0.9.5a-3.src.rpm  No joy.  When running just ssh, I get
> >>> "Disconnecting: Bad packet length 795178083."
> >>> 
> >>> This seems to be a problem with sshd, since the 2.3 ssh client will work
> >>> fine with a 2.1 server (but not scp, which still gives "select: Bad file
> >>> descriptor".
> >>> 
> >>> Any suggestions?
> >> 
> >> I've gotten the "select: Bad file descriptor" from not having the binary scp
> >> in the PATH that sshd sets on the server side when my scp running ssh
> >> connects.  This error message should probably be made more informative.
> >> 
> >> About the "Bad packet length" I've only gotten that when trying to play with
> >> F-Secure SSH.  I solved this problem by surrounding myself with mostly
> >> OpenSSH.
> >> 
> >> //Peter
> >> 
> >> 
> 
> 



$ ssh -v dhcorp301 ls
SSH Version OpenSSH_2.3.0p1, protocol versions 1.5/2.0.
Compiled with SSL (0x0090581f).
debug: Reading configuration data /usr/etc/ssh_config
debug: Applying options for *
debug: Seeding random number generator
debug: ssh_connect: getuid 0 geteuid 0 anon 0
debug: Connecting to dhcorp301 [216.200.130.46] port 22.
debug: Allocated local port 994.
debug: Connection established.
debug: Remote protocol version 1.99, remote software version
OpenSSH_2.3.0p1
debug: no match: OpenSSH_2.3.0p1
Enabling compatibility mode for protocol 2.0
debug: Local version string SSH-2.0-OpenSSH_2.3.0p1
debug: send KEXINIT
debug: done
debug: wait KEXINIT
debug: got
kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha
1
debug: got kexinit: ssh-dss
debug: got
kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes128-cbc,aes192-
cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc at lysa
tor.liu.se
debug: got
kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes128-cbc,aes192-
cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc at lysa
tor.liu.se
debug: got kexinit: hmac-sha1,hmac-md5,hmac-ripemd160 at openssh.com
debug: got kexinit: hmac-sha1,hmac-md5,hmac-ripemd160 at openssh.com
debug: got kexinit: none,zlib
debug: got kexinit: none,zlib
debug: got kexinit: 
debug: got kexinit: 
debug: first kex follow: 0 
debug: reserved: 0 
debug: done
debug: kex: server->client arcfour hmac-sha1 none
debug: kex: client->server arcfour hmac-sha1 none
debug: Sending SSH2_MSG_KEX_DH_GEX_REQUEST.
debug: Wait SSH2_MSG_KEX_DH_GEX_GROUP.
debug: Got SSH2_MSG_KEX_DH_GEX_GROUP.
debug: bits set: 520/1024
debug: Sending SSH2_MSG_KEX_DH_GEX_INIT.
debug: Wait SSH2_MSG_KEX_DH_GEX_REPLY.
debug: Got SSH2_MSG_KEXDH_REPLY.
debug: Host 'dhcorp301' is known and matches the DSA host key.
debug: bits set: 526/1024
debug: len 55 datafellows 0
debug: dsa_verify: signature correct
debug: Wait SSH2_MSG_NEWKEYS.
debug: GOT SSH2_MSG_NEWKEYS.
debug: send SSH2_MSG_NEWKEYS.
debug: done: send SSH2_MSG_NEWKEYS.
debug: done: KEX2.
debug: send SSH2_MSG_SERVICE_REQUEST
debug: service_accept: ssh-userauth
debug: got SSH2_MSG_SERVICE_ACCEPT
debug: authentications that can continue: publickey,password
debug: next auth method to try is publickey
debug: try pubkey: /usr/dh/home/prod/.ssh/id_dsa
debug: read DSA private key done
debug: sig size 20 20
debug: ssh-userauth2 successfull: method publickey
debug: channel 0: new [client-session]
debug: send channel open 0
debug: Entering interactive session.
debug: client_init id 0 arg 0
debug: Sending command: ls
debug: channel 0: open confirm rwindow 0 rmax 16384
debug: client_input_channel_req: rtype exit-status reply 0
debug: channel 0: rcvd eof
debug: channel 0: output open -> drain
debug: channel 0: rcvd close
debug: channel 0: input open -> closed
debug: channel 0: close_read
1
debug: channel 0: obuf empty
debug: channel 0: output drain -> closed
debug: channel 0: close_write
debug: channel 0: send close
debug: channel 0: full closed2
debug: channel_free: channel 0: status: The following connections are
open:
  #0 client-session (t4 r0 i8/0 o128/0 fd -1/-1)

debug: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.2 seconds
debug: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug: Exit status 0
$ 



$ ssh -v dhcorp301 ls asdf
SSH Version OpenSSH_2.3.0p1, protocol versions 1.5/2.0.
Compiled with SSL (0x0090581f).
debug: Reading configuration data /usr/etc/ssh_config
debug: Applying options for *
debug: Seeding random number generator
debug: ssh_connect: getuid 0 geteuid 0 anon 0
debug: Connecting to dhcorp301 [216.200.130.46] port 22.
debug: Allocated local port 687.
debug: Connection established.
debug: Remote protocol version 1.99, remote software version
OpenSSH_2.3.0p1
debug: no match: OpenSSH_2.3.0p1
Enabling compatibility mode for protocol 2.0
debug: Local version string SSH-2.0-OpenSSH_2.3.0p1
debug: send KEXINIT
debug: done
debug: wait KEXINIT
debug: got
kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug: got kexinit: ssh-dss
debug: got
kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc at lysator.liu.se
debug: got
kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc at lysator.liu.se
debug: got kexinit: hmac-sha1,hmac-md5,hmac-ripemd160 at openssh.com
debug: got kexinit: hmac-sha1,hmac-md5,hmac-ripemd160 at openssh.com
debug: got kexinit: none,zlib
debug: got kexinit: none,zlib
debug: got kexinit: 
debug: got kexinit: 
debug: first kex follow: 0 
debug: reserved: 0 
debug: done
debug: kex: server->client arcfour hmac-sha1 none
debug: kex: client->server arcfour hmac-sha1 none
debug: Sending SSH2_MSG_KEX_DH_GEX_REQUEST.
debug: Wait SSH2_MSG_KEX_DH_GEX_GROUP.
debug: Got SSH2_MSG_KEX_DH_GEX_GROUP.
debug: bits set: 544/1024
debug: Sending SSH2_MSG_KEX_DH_GEX_INIT.
debug: Wait SSH2_MSG_KEX_DH_GEX_REPLY.
debug: Got SSH2_MSG_KEXDH_REPLY.
debug: Host 'dhcorp301' is known and matches the DSA host key.
debug: bits set: 498/1024
debug: len 55 datafellows 0
debug: dsa_verify: signature correct
debug: Wait SSH2_MSG_NEWKEYS.
debug: GOT SSH2_MSG_NEWKEYS.
debug: send SSH2_MSG_NEWKEYS.
debug: done: send SSH2_MSG_NEWKEYS.
debug: done: KEX2.
debug: send SSH2_MSG_SERVICE_REQUEST
debug: service_accept: ssh-userauth
debug: got SSH2_MSG_SERVICE_ACCEPT
debug: authentications that can continue: publickey,password
debug: next auth method to try is publickey
debug: try pubkey: /usr/dh/home/prod/.ssh/id_dsa
debug: read DSA private key done
debug: sig size 20 20
debug: ssh-userauth2 successfull: method publickey
debug: channel 0: new [client-session]
debug: send channel open 0
debug: Entering interactive session.
debug: client_init id 0 arg 0
debug: Sending command: ls asdf
debug: channel 0: open confirm rwindow 0 rmax 16384
debug: client_input_channel_req: rtype exit-status reply 0
debug: channel 0: rcvd eof
debug: channel 0: output open -> drain
debug: channel 0: rcvd close
debug: channel 0: input open -> closed
debug: channel 0: close_read
debug: channel 0: obuf empty
debug: channel 0: output drain -> closed
debug: channel 0: close_write
debug: channel 0: send close
debug: channel 0: full closed2
debug: channel_free: channel 0: status: The following connections are
open:
  #0 client-session (t4 r0 i8/0 o128/0 fd -1/-1)

select: Bad file descriptor
debug: Transferred: stdin 0, stdout 0, stderr 29 bytes in 0.2 seconds
debug: Bytes per second: stdin 0.0, stdout 0.0, stderr 171.5
debug: Exit status 1
$ 







More information about the openssh-unix-dev mailing list