protocol error : expected control record
Nico Kadel-Garcia
nkadel at gmail.com
Thu Mar 20 10:15:29 EST 2014
The "solution" is to use "rsync -e ssh", which is often far more efficient and idem potent.
Nico Kadel-Garcia
Email: nkadel at gmail.com
Sent from iPhone
> On Mar 19, 2014, at 16:46, Ángel González <keisial at gmail.com> 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 at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
More information about the openssh-unix-dev
mailing list