Hello I am attempting to use the SSHD SSHClient to connect and execute several commands on a server.
I open a Client Channel as: ClientChannel channel = session.createChannel(ClientChannel.CHANNEL_SHELL) When I do I can get the output stream and read the greetnig from the server (so I am able to connect and authenticate). Next I send a simple command (say "ls") and try to read the results. The ls command appears to be written but I can see the results of the command. Is there an example of a client sending multiple commands and processing the results between each? Is there an easy way to do this? Perhaps the client code is not what I should be using. My requirement is I need to send a command string and process the results before sending another string. I need to detect if the server reports an error or not and in some cases branch to other commands based upon the results. This is all automated so I don't expect any human interaction. Pointers regarding how to detect when the output from a comand is finished would be appreciated. Many thanks, Claude -- I like: Like Like - The likeliest place on the web <http://like-like.xenei.com> LinkedIn: http://www.linkedin.com/in/claudewarren