Recently I started using Jsch. But I met a strange problem. This is my code:

import com.jcraft.jsch.*;
import java.io.*;

public class Shell
{
public static void main(String[] arg)
{
try
{
JSch jsch=new JSch();

String host = "host";
String user= "user";
Session session=jsch.getSession(user, host, 22);
session.setPassword("pass");

session.setConfig("StrictHostKeyChecking", "no");

//session.connect();
session.connect(30000); // making a connection with timeout.

Channel channel = session.openChannel("shell");

ByteArrayInputStream bi = new ByteArrayInputStream("ls -l\r".getBytes());
channel.setInputStream(bi);

channel.setOutputStream(System.out);

//channel.connect();
channel.connect(30000);
}
catch(Exception e)
{
System.out.println(e);
}
}
}

the code is simple, just use jsch's api to send shell script to the remote server, and the above code work well. Now the problem is, when I send "clish" command, it doesn't work. I mean, change the "ls -l" to "clish -e -w 'global-conf-view' -c 'nest mate'", the remote server only feedback "can't startup clish". who can tell me the reason and how I can solve this problem? Thanks!