How can i do that?!!
for ex i want to run this command:
cd /home/Fluent.Inc/bin
./fluent 3ddp ...
how can i do that with shell?! note that i want to hide commands from users and also i dont want to read it from shell script file .

--- On Mon, 2/9/09, sujata patra <> wrote:
From: sujata patra <>
Subject: Re: [JSch-users] running muliple commands
Date: Monday, February 9, 2009, 9:44 AM

why are you not implementing a shell (example ). Do not use  exec.

From: Ali Nazemian <>
Sent: Monday, January 26, 2009 2:08:03 AM
Subject: Re: [JSch-users] running muliple commands

Thanks , that works fine , but for large scripts , its not interesting to do in this way , but at least , its works now!!
IT should be a way to write scripts in one method and send it via channel ! maybe it need some hack in JSCH!!

--- On Sun, 1/25/09, <> wrote:
From: <>
Subject: Re: [JSch-users] running muliple commands
Date: Sunday, January 25, 2009, 4:47 PM

i'm also new to jsynch and i've achieved same
problem by using
semi-colon between commands ..

command.setCommand("cd test; mkdir newDir")
or i've also heard that it is also possible to use different channels for
each command

if u find out a smarter way please notify me


--- On Sat, 1/24/09, Ali Nazemian <> wrote:

> From: Ali Nazemian <>
> Subject: [JSch-users] running muliple commands
> To:
> Date: Saturday, January 24, 2009, 10:38 PM
> Hi ,
> i want to ssh via java using jsch , and run multiple
> execution commands , how should i do that?! it seems that i
> can run one command per channel?! do you have any sample
> code for running multiple commands?!
> Regards.

> This email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your
> JSch-users mailing list