I do not think this as jsch issue . I am using sudo some-command. I think you need configuring the sudoer .


From: Haidong Zhu <zhuhaidong98@gmail.com>
To: jsch-users@lists.sourceforge.net
Sent: Thu, April 29, 2010 5:14:31 PM
Subject: [JSch-users] About sudo

I tried to run something like "sudo ls /etc" using jsch, but it does not work, if i remove the "sudo", it works fine.

Does jsch support run sudo command on remote host?
JSch-users mailing list