Hi,
+-From: Erik Michel Giraldo Giraldo <[email protected]> --
|_Date: Mon, 5 Dec 2011 14:57:11 -0500 __________________________
|
|I already could to send multiple commands keeping the Input and Output
|streams, but now I have a problem, it looks like in reads in a lot of
|garbage and it takes ages for reading the input stream,
I guess that "a lot of garbage" means escape sequence characters
for terminal emulators. To disable them, try followings,
...
((ChannelShell)channel).setPty(false);
channel.connect();
...
but this trick may disable to show command prompts,
and you may not able to separate outputs from multiple commands correctly.
To work around such a problem, we usually use the separators as follows,
| ssh.executeMultipleCmds("mkdir /home/emgiraldo/Documentos/pepe");
ssh.executeMultipleCmds("echo '__SEPARATOR__'");
| ssh.executeMultipleCmds("cd /home/emgiraldo/Documentos/pepe/");
ssh.executeMultipleCmds("echo '__SEPARATOR__'");
| ssh.executeMultipleCmds("touch ensayis");
ssh.executeMultipleCmds("echo '__SEPARATOR__'");
| ssh.executeMultipleCmds("echo funciona > ensayis");
ssh.executeMultipleCmds("echo '__SEPARATOR__'");
Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
Skype callto://jcraft/
Twitter: http://twitter.com/ymnk
Facebook: http://facebook.com/aymnk
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users