channels: Warn against executing multiple commands in single channel

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2024-11-13 17:40:23 +01:00
parent c043122655
commit 0ea982d4ec
2 changed files with 12 additions and 0 deletions

View File

@@ -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()
*/