Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable timeouts in ClientSession#execRemoteCommand #522

Open
abyssmaldev opened this issue Jun 25, 2024 · 0 comments
Open

Configurable timeouts in ClientSession#execRemoteCommand #522

abyssmaldev opened this issue Jun 25, 2024 · 0 comments

Comments

@abyssmaldev
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant