It does not. open ssh linux to mac, typing ~ just types it on fish shell prompt. It works after`cat` followed by ENTER
Is this a current-ish version of OpenSSH or some other client/server?
EDIT Interesting! I tested it with fish and it does indeed intercept it! Wonder how that works.
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.