without this I wasn't able to reconnect as connect() did hang when retrying. session.disconnect() has a guard internally already.

Currently I can't test anymore as Denis' intrusion prevention heuristics locked my IP and he didn't yet manage to unlock me again.

Maybe we should seek IP approval for apache sshd to implement a sshd for testing this properly.