disconnect

suspend fun disconnect()(source)

Disconnect from the SSH server.

Aborts outstanding writes, discards unread channel output, and closes the transport. Await SshSession.write before disconnecting when local write completion matters. To confirm remote processing, wait for the corresponding application or protocol response before disconnecting.