sftp Couldn't read packet: Connection reset by peer
J.A. Neitzel
gsocsftp at v6shell.org
Mon Apr 6 06:57:54 EST 2009
William Ahern <william at 25thandClement.com> wrote:
> On Sun, Apr 05, 2009 at 06:53:45PM +0100, Jon Grant wrote:
> > Hello
> >
> > I saw this error below. My feeling is that the second line is not
> > needed. Would a patch be accepted to change it? If it's easy enough to
> > do I could probably track down the bit of code generating it.
> >
> > the ssh error is also not quite as good as it could be, My feeling is
> > that it doesn't need to tag "Name or service not known" on to the end
> > of the line when it has already said it Could not resolve the
> > hostname!
>
> That's what strerror(errno) gives, and you only think it's not needed
> because you probably already knew what the problem was. If the system error
> was "Network unreachable", but it was never printed, you might be ripping
> your hair out.
And by the same token, removing the diagnostic message:
fatal("Couldn't read packet: %s", strerror(errno));
...
from sftp-client.c would be equally unkind to the user since knowing
that packet cannot be read and why is too useful to remove.
Removing it could provoke users to generate a local patch to add
the diagnostic back in when it should not be necessary for them to
do so. In short, proper diagnostics are critical for users to
understand why an operation fails.
Jeff
More information about the openssh-unix-dev
mailing list