The "solution" is to use "rsync -e ssh", which is often far more efficient and idem potent. Nico Kadel-Garcia Email: nkadel@xxxxxxxxx Sent from iPhone > On Mar 19, 2014, at 16:46, Ángel González <keisial@xxxxxxxxx> wrote: > >> On 17/03/14 11:48, RAVI PRATAP Singh wrote: >> Hi All, >> >> During scp, I am seeing this message >> protocol error : expected control record >> >> This message came because scp sink was expecting the message starting from >> 'C' or 'D' , something like C0644 299 group or D0755 0 docs but during dns >> query we were printing "Using IP address" message on the stdout. >> >> So , the message in the buffer was "Using IP address" and thus message >> "protocol error : expected control record" was thrown. >> >> >> Is openssh scp should always expect 'Cmmmm' or 'Dmmmm' messages ? Is fix >> available for taking care scenario where on stdout something is printed. >> >> Thanks >> Ravi Pratap > > That's a known drawback of scp, messages on stdout by other programs interfere with it. The “solution” is to .use sftp instead. > Anyway, you should only be printing that message on interactive sessions. > > Commands like: > ssh myhost "cat /etc/passwd" > passwd-copy > shouldn't be prefixed with the ip address you were using :) > > > _______________________________________________ > openssh-unix-dev mailing list > openssh-unix-dev@xxxxxxxxxxx > https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev