Re: server limits commands to MAX_CMD_LEN

2015-07-01 Thread Laurent Bercot

On 01/07/2015 19:24, Tim Broberg wrote:

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


 I've run into the same issue and just recompiled dropbear with increased
limits. 8k is enough for me (but 4k is not enough, so Matt, if you're
changing the default, please make it 8k :-))

--
 Laurent



Re: server limits commands to MAX_CMD_LEN

2015-07-01 Thread Matt Johnston
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