I am trying to list all the files/directory from a remote server using JSCH and i can able to get all the information as well..
But my problem is JSCH list all the
try to exec ls command :
Channel channel=session.openChannel("exec");
((ChannelExec)channel).setCommand("cd " + SFTPWORKINGDIR + " && ls");
channel.connect();
channel.run();
Vector filelist = channel.run();
for (int i = 0; i < filelist.size(); i++) {
System.out.println(filelist.get(i).toString());
}