diff --git a/doc/command.dox b/doc/command.dox index 588151c6..7b5bddb7 100644 --- a/doc/command.dox +++ b/doc/command.dox @@ -91,4 +91,10 @@ that it used: } @endcode +Warning: In a single channel, only ONE command can be executed! +If you want to executed multiple commands, allocate separate channels for +them or consider opening interactive shell. +Attempting to run multiple consecutive commands in one channel will fail. + + */ diff --git a/src/channels.c b/src/channels.c index 72f44102..fdb9e7b2 100644 --- a/src/channels.c +++ b/src/channels.c @@ -2783,6 +2783,12 @@ error: } } @endcode + * + * @warning In a single channel, only ONE command can be executed! + * If you want to executed multiple commands, allocate separate channels for + * them or consider opening interactive shell. + * Attempting to run multiple consecutive commands in one channel will fail. + * See RFC 4254 Section 6.5. * * @see ssh_channel_request_shell() */