Date: Mon, 1 Dec 2008 01:21:24 -0800 (PST) From: Eugene Pimenov <libc.mail@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: Pasting via ssh causes data loss Message-ID: <b063e558-4451-4caf-b17e-cb0c6f5d00ce@33g2000yqm.googlegroups.com> In-Reply-To: <7A98FEF9-AA2E-4860-A1BD-A15BD9CACA34@hughes.net> References: <BE908921-8606-4D31-85A7-23C443EDA2B5@gmail.com> <ggusi0$1ms$1@ger.gmane.org> <e4160dcf-65b5-4d89-8023-e36955243bfc@33g2000yqm.googlegroups.com> <7A98FEF9-AA2E-4860-A1BD-A15BD9CACA34@hughes.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1 =C4=C5=CB, 05:03, Chris <eaglet...@hughes.net> wrote: > > I was curious about your situation and set up a couple of tests. Noting > you mentioned iTerm, I thought I might be able to recreate it on a Mac > (OS-X 10.4 with 1.4.3 (100) version Terminal, I had removed iTerm due > to unreliability sometime back). I've downloaded iTerm for this test. I'm using Apple's Terminal.app. > > I copied a 23094 byte program I was working on locally in MacVIM. I > first did > a cat >testfile then pasted through an ssh terminal.app connection > over satellite (very > bad connection) into a FreeBSD 7.0 box I built in the last month. At > the far end it received 23094 bytes. sftp of the file to the remote and > diff showed no differences. I then opened an ssh session to a FreeBSD > server > on my local lan and repeated with the same results. No problems. I believe that FreeBSD fetches all data. When I ssh back to my mac from FreeBSD, I recieve all data all the time. TCP should handle errors, so nothing surprising here. > > The problem does not appear to be obvious or common so there must be > something > unique about how this situation if you have reproduced it on two > different terminal programs using ssh that would work correctly to other > servers using the same shell and collection method (e.g. cat >blah). I tried zsh, sh, bash and my program on the freebsd box. > > Something missing here. Have you checked if you have > errors shown on the interface of the server? Are there losses if you > sftp > the files from your machine to the remote (Try pushing a 1.5 MB file and > see if that shows failures). Did you install something other than the > default > OpenSSH on the server? Do the text files have something other than text > in them or even control sequences for the remote? Just taking > potshots here. sftp doesn't lose data. Even cat file | ssh host 'cat >file' doesn't. Only pasting. It's 100% reproducible, I don't think it's some kind of side effect. $ netstat -I bge0 Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll bge0 1500 <Link#1> 00:a0:d1:e3:fd:9c 55134708 0 48858321 0 0 (no errors) Terminal sessions: http://pastie.org/327615.txt?key=3Dopkxhrjptnh3lebyn8rjlq http://pastie.org/327617.txt?key=3Dgaznt1zmfi7usps74n2h5w I believe nothing strange was installed on the server... it's a typical freebsd web-server. > > A somewhat side note here, I would personally never think to move > files this > way since it's quite possible that content of files can disrupt the > stream. > I tend to use sftp. > I never do that for binary files. I use sftp either. However, when I need to change some source on a server, I already have an opened text editor with the file and a terminal, in that case cat >file is just quickier. BTW, thank you for your help, guys...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b063e558-4451-4caf-b17e-cb0c6f5d00ce>