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

How to send several commands one after the other #87

Closed
unaor opened this issue Feb 18, 2020 · 4 comments
Closed

How to send several commands one after the other #87

unaor opened this issue Feb 18, 2020 · 4 comments

Comments

@unaor
Copy link

unaor commented Feb 18, 2020

I understand how to create a ssh shell
Shell ssh = new SshByPassword("192.168.1.5", 22, "admin", "password");
i also understand how to run a command
String output = new Shell.Plain(ssh).exec("some command");
and i can easly analyze the output string

but how do i send in the same "shell" one command after the other

and bonus question sometimes the commands require a user confirmation ("press Y to continue")

is it possible with the library?

@0crat
Copy link

0crat commented Feb 18, 2020

@yegor256/z please, pay attention to this issue

@0crat
Copy link

0crat commented Feb 18, 2020

@unaor/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

@yegor256
Copy link
Member

@unaor nope, it's not. This library is only for simple one-time commands. If you need a more complicated scenario, you JSch directly.

@0crat
Copy link

0crat commented Sep 26, 2022

Job gh:jcabi/jcabi-ssh#87 is not assigned, can't get performer

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

3 participants