I have ControlPersist 4h in my .ssh/config and it works perfectly,
Every now and then I need to connect to this server that requires some special authentication, and if I don't use that account for while it locks my account,
the problem happens like this, I don't use my account for a while, then I ssh into the server, it checks and my account is locked so it says so but it does not actually kick me out, so if I go away (Ctrl-D, or closing the terminal) and contact the admin to unlock my account and try to connect again, my session is "kept alive" on my end and it basically does not try again, unless I reboot, or kill all ssh related processes, which is annoying,
Is there a way to close these sessions which are living in the background?
kill <process>with running<close_command> <process>? Aren't you still just running a command? I don't understand what the difference is.ControlPersistthing, there should be a way to ask ssh to close these.