How to remove a port bind still used by sshd after an improper deconnection from ssh?
Solution 1:
You also need to set timeout options on the ssh server so that it will drop the connection more quickly.
For example you might add to /etc/ssh/sshd_config
:
ClientAliveInterval 60
ClientAliveCountMax 3