6 ms·
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 forwardin
by buredoranna 3mo 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)
- telotortium 3mo agoImportant 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.
- ptaffs 3mo agoso many time i have inadvertently ended a session with a fat fingered ~.
- trentnelson 3mo agoNot ssh related but I regularly suspend my terminal with Ctrl-S by accident, usually when going for Ctrl-C/V. That was a nightmare to triage back in the late 90s when I did it. Thankfully Ctrl-Q (I think it’s Q) “resumes”, so, easy fix if you know what you’ve done.
- coryrc 3mo agoCorrect. - software flow control user
- jojo2354 3mo agoEh, once I started using master sockets, I never went back. Problem with ~C is it's hard to keep track of what you have open.