jSch有一个简单的示例,显示了如何做到这一点:
http://www.jcraft.com/jsch/examples/shell.java.html
jsch
中的“ shell”频道和“ exec”频道之间的区别是什么