Releasing a connection
Top  Previous  Next

To disconnect from the SSH server and cleanup any resources invoke the SshSession#disconnect method. You should always invoke the SshSession#disconnect method after you are finished with the SSH session.

Example


// release connection
session.disconnect();