I commonly have 4-6 ssh sessions open at once, and when I lose my VPN connection, they just sit there until their timeout hits. I was looking for a way to stop the session, and CTRL-C, CTRL-D, CTRL-Z and everything inbetween didn’t work.
I found salvation in: ‘~.’
That will exit your session no problem.