wood burning stoves 2.0*
The moose likes Java in General and the fly likes Execute a command on a remote Shell using JSCH Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Execute a command on a remote Shell using JSCH" Watch "Execute a command on a remote Shell using JSCH" New topic
Author

Execute a command on a remote Shell using JSCH

Marco Zanini
Ranch Hand

Joined: Oct 31, 2011
Posts: 43
Hi to all, I'm trying to remotely execute a command on a Linux shell using SSH. I'm using JSCH. But sometimes when I call the connect(int timeout) command it doesn't work, and sometimes seems that it blocks.

This is the code:

How can I develop an error-proof connection?
 
jQuery in Action, 2nd edition
 
subject: Execute a command on a remote Shell using JSCH