I'm used to set up automatic reverse ssh tunnels to remote computers via my server with
Usually I use the following entry:
@reboot sleep 300 && ssh -MNf -R xxx22:host:22 firstname.lastname@example.org
I want to detect when such connection happens. I would like to have some script invoked automatically on connect event.
However because of
-N option standard SSH's tools (ones I'm aware about) do not work.
ForceCommand and similar configuration features won't help me.
So is there anything inside of SSH itself to help me or should I dig into
iptables/whatever to deal with the issue?