www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: Executing commands for channel

Re: Executing commands for channel

From: Peter Stuge <peter_at_stuge.se>
Date: Thu, 9 Jul 2015 20:27:05 +0200

Kishore Av wrote:
> What's the max limit of bytes we can send as command in
> libssh2_channel_exec API.

That depends on the server OS kernel as much as the server-side SSH
implementation. You can control neither.

> As i tried, 34,725 bytes of string can be sent as command in that api.
> I using loop say it iterates till 4mb. First iteration,
> libssh2_channel_exec success in executing command, but from 2nd
> iteration getting fails - throws error - unable to send channel
> request.

As I explained, you must use a special program on the server to
facilitate the execution of multiple commands. You will have to
create and supply that program, ideally as part of setting up the

libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2015-07-09

the libssh2 team