server limits commands to MAX_CMD_LEN

Tim Broberg Tim.Broberg at servicenow.com
Thu Jul 2 01:24:38 AWST 2015


Yes, I have had to scp scripts to the target and run them in place for
large commands specifically because of dropbear.

Irritating, but I understand the need to limit memory usage.
    - Tim.

On 7/1/15, 9:45 AM, "Matt Johnston" <matt at ucc.asn.au> wrote:

>Hi Szabolcs,
>
>4k sounds like an OK limit, I'll increase that. Handling
>larger limits like shells (200k+?) would be harder -
>Dropbear expects SSH packets to be under 32kB.
>
>Cheers,
>Matt
>
>On Wed, Jul 01, 2015 at 06:32:36PM +0200, Szabolcs Nagy wrote:
>> some of my long ssh commands failed with
>> 
>> exec request failed on channel 0
>> 
>> and it seems the dropbear server rejected them because of the limits
>> in sysoptions.h:
>> 
>> #define MAX_CMD_LEN 1024 /* max length of a command */
>> //...
>> #define MAX_STRING_LEN 2400 /* Sun SSH needs this long for algos */
>> 
>> i assume these affect scp too, so i think it would make sense
>> if they were at least the historical PATH_MAX (4K).
>> 
>> (MAX_CMD_LEN is probably not needed if MAX_STRING_LEN already
>> limits the command buffer size).
>> 
>> or am i expected to manually tweak these limits if i want
>> to run commands using long filenames?
>> 
>> thanks



More information about the Dropbear mailing list