Ensure SSH Client releases the lock on disconnect
Ensure SSH Client releases the lock on disconnect

It's always possible tha closing the connection could raise
an unexpected exception. There's nothing the documentation
that specifically identifies exceptions, but if one is raised
the client could be left with its lock acquired.

Therefore, perform the close operation in a try..finally clause
to  ensure the lock is released.

kdopen/gerritssh,kdopen/gerritssh