4 ms·
This is a great tip that I use all the time. To be more precise ~ is the default ssh escape character. It is only treated as the ssh escape character if it is
by psanford 4y ago
This is a great tip that I use all the time.
To be more precise ~ is the default ssh escape character. It is only treated as the ssh escape character if it is at the beginning of a new line. From the ssh(1):
> The escape character followed by a dot (`.') closes the connection; followed by control-Z suspends the connection; and followed by itself sends the escape character once.
- jrib 4y agoAlso, ~? will print a list of the available escape sequences.
- GekkePrutser 4y agoAnd if you're deeper in nested SSH sessions you can use a number of ~s to indicate which one to kill. There's more commands than the dot too but I admit I forgot the others
- francislavoie 4y agoAhhh that would explain why it didn't feel consistent for me, since I use ProxyCommand to hop through another box most of the time. I usually need to do that key sequence twice. But I guess now I know I just need the tilde twice.
- fragmede 4y agoI think the ProxyJump config option will help you.
- tominous 4y agoProxyJump (or the -J option as a shortcut) plus TCP port forwarding (-L/-R) is ridiculously powerful. You can chain jump hosts with commas, threading a port forward deep into (or out of) multiple server hops with a single command.
- deleted 4y ago[deleted]