Hacker News new | ask | show | jobs
by vzaliva 102 days ago
It does not. open ssh linux to mac, typing ~ just types it on fish shell prompt. It works after`cat` followed by ENTER
2 comments

Just type <enter> without cat, your shell will show you another prompt, and the ssh escape command will also work.
No they are correct, fish seems to intercept this or something like that. Only works with cat.
So you're saying 'fish' intercepts it on the far end? The ssh server on the far end shouldn't be sending it to 'fish' until it knows what's coming next.

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.

In newer versions, it's disabled by default and you have to do something like this to enable in ~/.ssh/config:

    Host *
    EnableEscapeCommandline yes
`EnableEscapeCommandline` only controls the <Enter>~C commandline.

The 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.