Date: Sun, 30 Nov 2008 08:46:59 +0300 From: Eugene Pimenov <libc.mail@gmail.com> To: freebsd-questions@freebsd.org Subject: Pasting via ssh causes data loss Message-ID: <BE908921-8606-4D31-85A7-23C443EDA2B5@gmail.com>
next in thread | raw e-mail | index | archive | help
Hello everyone, I'm not really sure weither it's related to freebsd or ssh. When I paste a lot of data (6060 bytes, 60 lines 100 bytes each + =20 =91\n=92) via ssh into `cat > test.txt` or the small program, one = freebsd =20 receives 5181, another receives 3221 bytes. The number of bytes freebsd receives are always the same. I can't reproduce this on linux (OpenSSH 4.3p2 on debian and OpenSSH =20 4.7p1 on 2 gentoo boxes). Also, I have one freebsd box without this =20 problem (7.0-STABLE, openssh 4.5p1). Source of the small program: #include <stdio.h> int main() { char buf[10000]; size_t readed =3D 0; while(!feof(stdin)) { readed+=3Dfread(buf, 1, sizeof(buf), stdin); } printf("I've received %d bytes\n", readed); return 0; } Versions of sshd are =93OpenSSH_4.5p1 FreeBSD-20061110, OpenSSL 0.9.8e =20= 23 Feb 2007=94. FreeBSD versions are FreeBSD 7.0-BETA4 and FreeBSD 7.0-=20= RELEASE. Why is it happening? What should I do to stop this? It's pretty =20 annoying. ~
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BE908921-8606-4D31-85A7-23C443EDA2B5>