I am using sshj to communicate from my java application
try {
final Command cmd = session.exec("tcpdump <some command>");
System.out.println(IOUtils.readFully(cmd.getInputStream()).toString());
cmd.join(5, TimeUnit.SECONDS);
System.out.println("\n** exit status: " + cmd.getExitStatus());
} finally {
session.close();
}
This works like charm, now once i want to kill this process (CTRL + C) using same sshj. I have no clue, Is there any command to do it?