Mailing List Archive

Protocol error's with 2.1.0p2
I'm getting "Protocol errors" when trying to scp files from my
laptop to my desktop (only when trying to scp root@laptop:/path/file, not
vis-vis). See screen dump's at end of e-mail for exact details. The most
confusing thing about this problem (to me anyway), is that this is a
one-way problem. I can log into the laptop and scp files down from the
desktop no problems.

System software spec's.

Desktop: RedHat 6.2, fairly vanilla - 2.2.15 kernel compiled with fairly
standard options, extra packages and such, but no real
"changes" per-se as far as packages, just additions.

Laptop: RedHat 6.2, very vanilla - stock kernel, a few extra packages,
and not much else.

OpenSSL version: 0.9.5a
OpenSSH version: 2.1.0p2

Both packages were built from SRPM's on the desktop machine. I
have also gone through and verified that all lib's and versions reported
by ldd /usr/bin/scp and ldd /usr/sbin/sshd are identical. Config files on
both boxes match as far as options, and with the desktop, and I have no
problem scp'ing with any other box I use openssh to communicate with
(although they are mostly openssh-1.2.x flavor's), this is isolated to
scp'ing with the laptop.

I've also stripped openssh from both boxen completely (even rpm
-Rf ~/.ssh), and re-installed, to no avail.

Anyway, long and short of explanations above, I have some small
amount of clue, and have done as much homework on trying to figure this
out as I know how to do. Obviously I don't know everything, or I'd have
this working by now though. :)

Screen dump's of debug output below:


[root@desktop] [~]# scp root@10.10.10.220:/etc/inetd.conf .
root@10.10.10.220's password:
protocol error: unexpected <newline>
Connection to 10.10.10.220 closed by remote host.
[root@desktop] [~]#

# dump below was generated by scp -v root@10.10.10.220:/etc/inetd.conf 2>
ssh.debug
Executing: host 10.10.10.220, user root, command scp -v -f /etc/inetd.conf
SSH Version OpenSSH-2.1, protocol versions 1.5/2.0.
Compiled with SSL (0x0090581f).
debug: Reading configuration data /etc/ssh/ssh_config
debug: Applying options for *
debug: Seeding random number generator
debug: ssh_connect: getuid 0 geteuid 0 anon 0
debug: Connecting to 10.10.10.220 [10.10.10.220] port 22.
debug: Seeding random number generator
debug: Allocated local port 767.
debug: Connection established.
debug: Remote protocol version 2.0, remote software version OpenSSH-2.1
Enabling compatibility mode for protocol 2.0
debug: Local version string SSH-2.0-OpenSSH-2.1
debug: Sending KEX init.
debug: done
debug: got kexinit string: diffie-hellman-group1-sha1
debug: got kexinit string: ssh-dss
debug: got kexinit string: 3des-cbc,blowfish-cbc,arcfour,cast128-cbc
debug: got kexinit string: 3des-cbc,blowfish-cbc,arcfour,cast128-cbc
debug: got kexinit string: hmac-sha1,hmac-md5,hmac-ripemd160@openssh.com
debug: got kexinit string: hmac-sha1,hmac-md5,hmac-ripemd160@openssh.com
debug: got kexinit string: zlib,none
debug: got kexinit string: zlib,none
debug: got kexinit string:
debug: got kexinit string:
debug: first kex follow == 0
debug: reserved == 0
debug: done read kexinit
debug: kex: server->client blowfish-cbc hmac-sha1 none
debug: kex: client->server blowfish-cbc hmac-sha1 none
debug: Sending SSH2_MSG_KEXDH_INIT.
debug: bits set: 516/1024
debug: Wait SSH2_MSG_KEXDH_REPLY.
debug: Got SSH2_MSG_KEXDH_REPLY.
debug: keytype ssh-dss
debug: keytype ssh-dss
debug: Host '10.10.10.220' is known and matches the DSA host key.
debug: bits set: 520/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: key does not exist: /root/.ssh/id_dsa
debug: ssh-userauth2 successfull
debug: fd 7 setting O_NONBLOCK
debug: fd 8 setting O_NONBLOCK
debug: fd 9 setting O_NONBLOCK
debug: channel 0: new [client-session]
debug: send channel open 0
debug: Entering interactive session.
debug: callback start
debug: client_init id 0 arg 0
debug: Sending command: scp -v -f /etc/inetd.conf
debug: client_set_session_ident: id 0
debug: callback done
debug: channel 0: open confirm rwindow 0 rmax 32768
debug: channel 0: rcvd adjust 16384
debug: channel 0: send data len 1
protocol error: unexpected <newline>
debug: channel 0: send data len 43
debug: channel 0: read<=0 rfd 7 len 0
debug: channel 0: read failed
debug: channel 0: input open -> drain
debug: channel 0: close_read
debug: channel 0: input: no drain shortcut
debug: channel 0: ibuf empty
debug: channel 0: input drain -> closed
debug: channel 0: send eof
debug: channel 0: write failed
debug: channel 0: output open -> closed
debug: channel 0: close_write
debug: channel 0: send close
debug: channel 0: rcvd 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)

Connection to 10.10.10.220 closed by remote host.
debug: Transferred: stdin 0, stdout 0, stderr 51 bytes in 0.1 seconds
debug: Bytes per second: stdin 0.0, stdout 0.0, stderr 448.1
debug: Exit status -1


Anyway, any help is appreciated. Cheers!

--
A.L.Lambert

--------------------------------------------------------------------------
If what they've been doing hasn't solved the problem, tell them to do
something else.
-- Gerald Weinberg, "The Secrets of Consulting"
--------------------------------------------------------------------------
Re: Protocol error's with 2.1.0p2 [ In reply to ]
On Sun, 28 May 2000, A.L. wrote:

> I'm getting "Protocol errors" when trying to scp files
> from my laptop to my desktop (only when trying to scp
> root@laptop:/path/file, not vis-vis). See screen dump's at end
> of e-mail for exact details. The most confusing thing about this
> problem (to me anyway), is that this is a one-way problem. I can
> log into the laptop and scp files down from the desktop no problems.

Do you have something in you .bashrc (or similar) which causes
output at login time? This is likely the problem.

Move whatever it is to .bash_login or similar so it only gets
executed when you are starting an interactive session.

-d

--
| "Bombay is 250ms from New York in the new world order" - Alan Cox
| Damien Miller - http://www.mindrot.org/
| Email: djm@mindrot.org (home) -or- djm@ibs.com.au (work)
Re: Protocol error's with 2.1.0p2 [ In reply to ]
> > I'm getting "Protocol errors" when trying to scp files
> > from my laptop to my desktop (only when trying to scp
> > root@laptop:/path/file, not vis-vis). See screen dump's at end
> > of e-mail for exact details. The most confusing thing about this
> > problem (to me anyway), is that this is a one-way problem. I can
> > log into the laptop and scp files down from the desktop no problems.
>
> Do you have something in you .bashrc (or similar) which causes output
> at login time? This is likely the problem.
>
> Move whatever it is to .bash_login or similar so it only gets executed
> when you are starting an interactive session.
>
> -d

As a mater of fact... DOH! And now that you mention it, it makes
sense to me. Removed the MOTD printout, and all works great again. Many
many thanks Damien, you saved me from pulling out what's left of my hair.
:)

--
A.L.Lambert

--------------------------------------------------------------------------
If what they've been doing hasn't solved the problem, tell them to do
something else.
-- Gerald Weinberg, "The Secrets of Consulting"
--------------------------------------------------------------------------