Hacker News new | ask | show | jobs
by buredoranna 2 hours ago
I'll mention it here, because I learned about it here.

"~C" will drop you into the SSH command line, allowing you to, among other things, effect port forwarding

  -L8080:localhost:443
Learning that "~C" exists, and what you can do with it, has supercharged my use of SSH tunnels, which were already awesome on their own.

But for some reason this has been disabled by default in more recent ssh configurations... to ensure its available

  -o EnableEscapeCommandline=yes
or, in your ~/.ssh/config

  EnableEscapeCommandline yes
(edit: formatting)
1 comments

Important to note that `~` SSH commands work only right after you press Enter - it doesn’t trigger everywhere you press `~`.

Also EnableEscapeCommandline fortunately only affects `~C` - the all-important `~.` to kill a hung SSH session still works with it disabled.

so many time i have inadvertently ended a session with a fat fingered ~.