Herbert Wu
2015-04-14 01:33:11 UTC
Hi,
I created a local ChannelExec and can execute unix command on remote host
correctly, but after call close() method below, the sshd process still
exists on the remote host until local jvm quits.
Anything wrong here to close sshd before local jvm quits?
Local JDK: 1.7
Remote host: Linux 2.6.x with OpenSSH_4.3p2
Thanks
Herbert
*public* *void* close() {
*if* (channel != *null*) {
channel.disconnect();
channel=*null*;
}
*if* (session != *null*) {
session.disconnect();
session=*null*;
}
}
I created a local ChannelExec and can execute unix command on remote host
correctly, but after call close() method below, the sshd process still
exists on the remote host until local jvm quits.
Anything wrong here to close sshd before local jvm quits?
Local JDK: 1.7
Remote host: Linux 2.6.x with OpenSSH_4.3p2
Thanks
Herbert
*public* *void* close() {
*if* (channel != *null*) {
channel.disconnect();
channel=*null*;
}
*if* (session != *null*) {
session.disconnect();
session=*null*;
}
}