Host *
EnableEscapeCommandline yesThe reason that is disabled in current OpenSSH by default is OpenBSD `pledge` support:
https://security.stackexchange.com/questions/280793/what-att...
On my Linux,
cat<Enter>~.
closes the connection as expected, and no ~ is shown in the terminal.