[JSch-users] remote sshd cannot be closed after disconnect() call
Status: Alpha
Brought to you by:
ymnk
|
From: Herbert Wu <her...@gm...> - 2015-04-14 01:33:19
|
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*;
}
}
|