I know that I can run a local command when I establish a ssh connection, something which is quite useful for setting up terminal title for example.
Still, I'm looking for a solution to run a command when the ssh connection is closed.
Usage:
>ls
>ssh server2
# want to run something here on the client, this can be done with .ssh/config ProxyCommand
>ls
>exit
# I want to run something on the client, how!?
>ls