Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PuTTY 0.63 issue

478 views
Skip to first unread message

S.K.R. de Jong

unread,
Feb 28, 2014, 12:08:13 PM2/28/14
to
I have noticed that some file transfers using pscp from PuTTY
0.63 end up printing out the following diagnostic:

Fatal: Received unexpected end-of-file from server

However, the transfers are always completed successfully. Looking into
the PuTTY code I located a function called from_backend_eof defined as
follows:

int from_backend_eof(void *frontend)
{
/*
* We expect to be the party deciding when to close the
* connection, so if we see EOF before we sent it ourselves, we
* should panic.
*/
if (!sent_eof) {
connection_fatal(frontend,
"Received unexpected end-of-file from server");
}
return FALSE;
}

The comment makes me wonder if PuTTY is not proceeding according
to the SSH specification here: in RFC 4254, section 5.3, it is explicitly
said that either party may send an SSH_MSG_CHANNEL_EOF packet to signal
that it has no more data to send through the particular channel.

Simon Tatham

unread,
Feb 28, 2014, 1:45:39 PM2/28/14
to
S.K.R. de Jong <SK...@nowhere.net> wrote:
> The comment makes me wonder if PuTTY is not proceeding according
> to the SSH specification here: in RFC 4254, section 5.3, it is explicitly
> said that either party may send an SSH_MSG_CHANNEL_EOF packet to signal
> that it has no more data to send through the particular channel.

That's missing the point. Either party can initiate shutdown of an SSH
channel in general and it's legal at the SSH level, but depending on
what protocol is being spoken over that channel, it might not be legal
at the level of that protocol. That error message is talking about
unexpectedness in the SCP protocol, not the SSH protocol beneath it.

That said, you are right that this is a bug. It's fixed in the
development snapshots (specifically, r10016).
--
Simon Tatham "Imagine what the world would be like if
<ana...@pobox.com> there were no hypothetical situations..."

S.K.R. de Jong

unread,
Feb 28, 2014, 5:26:47 PM2/28/14
to
On Fri, 28 Feb 2014 18:45:39 +0000, Simon Tatham wrote:

> S.K.R. de Jong <SK...@nowhere.net> wrote:
>> The comment makes me wonder if PuTTY is not proceeding according to the
>> SSH specification here: in RFC 4254, section 5.3, it is explicitly said
>> that either party may send an SSH_MSG_CHANNEL_EOF packet to signal that
>> it has no more data to send through the particular channel.
>
> That's missing the point. Either party can initiate shutdown of an SSH
> channel in general and it's legal at the SSH level, but depending on
> what protocol is being spoken over that channel, it might not be legal
> at the level of that protocol. That error message is talking about
> unexpectedness in the SCP protocol, not the SSH protocol beneath it.

There is no written specification for the SCP protocol though.
0 new messages