jcabi-ssh icon indicating copy to clipboard operation
jcabi-ssh copied to clipboard

How to send several commands one after the other

Open unaor opened this issue 5 years ago • 2 comments

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?

unaor avatar Feb 18 '20 21:02 unaor

@yegor256/z please, pay attention to this issue

0crat avatar Feb 18 '20 21:02 0crat

@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!

0crat avatar Feb 18 '20 21:02 0crat

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

yegor256 avatar Sep 26 '22 05:09 yegor256

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

0crat avatar Sep 26 '22 06:09 0crat