mina-sshd
mina-sshd copied to clipboard
Configurable timeouts in ClientSession#execRemoteCommand
Description
The executeRemoteCommand API in ClientSession needs a configurable timeouts since the default behavior is to try and run the commands indefinitely (correct me if I am wrong here)
https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSession.java#L307-L310
Motivation
We use mina-sshd to execute some scripts on bunch of embedded device. The default behavior in executeRemoteCommand led one of the commands to execute for a long time (upto 20 minutes!) due to a bug in the script in the remote server.
Alternatives considered
Creating a Channel ourselves is an acceptable workaround, but we'd prefer the simplicity of setting a timeout and use this API instead.
Additional context
No response