Earlier quoted context omitted.
Note that it only works after pressing enter, so the odds are slim. In practice, I don't think I ever hit it by accident.
I have noticed it while running ~/bin/some_command. The ~ doesn't echo until I also type the /. It doesn't cause any misbehavior because there is no binding for ~/ but can be slightly surprising.
SSH Secret Menu
31–40 of 184 posts
Re: SSH Secret Menu
#32That doesn't do much good if you set `EscapeChar` to `none` in `.ssh/config`. I find it convenient not to have to worry about accidentally entering escape characters. YMMV.
SSH does it pretty well though. Never once have I done it by mistake.
Re: SSH Secret Menu
#33Earlier quoted context omitted.
SSH does it pretty well though. Never once have I done it by mistake.
I'd guess this is because it only works in ssh PTY sessions. So it would have no effect on tunneling or when piping arbitrary data through ssh to a non-interactive remote command (unless you use the -t switch to force PTY allocation even when stdin is not a TTY).
And when I port forward I usually don't even tunnel it over SSH because all my stuff is on tailscale so it's also encrypted.
Re: SSH Secret Menu
#34I really hate it when people just rename terms. It made it harder to search properly for better answers.
Re: SSH Secret Menu
#35Re: SSH Secret Menu
#36I've been using SSH for ~15 years and never knew about these escape sequences. I'm eagerly awaiting my next hung session so that I can test `~.`. It's much nicer than my current approach of having to close that terminal window.
Have been using that weekly since probably 20 years. Will change your life :) My other favourite is I very often SSH with -v to figure out why the connection is hanging, you rapidly figure out if DNS is failing, the TCP connection doesn't open, it does open but no traffic flows at all or it opens and SSH negotiation starts but never finishes. You can learn a lot just from this about what is wrong.
Re: SSH Secret Menu
#37I've been using SSH for ~15 years and never knew about these escape sequences. I'm eagerly awaiting my next hung session so that I can test `~.`. It's much nicer than my current approach of having to close that terminal window.
Re: SSH Secret Menu
#38I've used ~. for a long time but did not know about others. I know, should have read man page. Anyway, if you try it from shell prompt it is likely will not work as pressing ENTER shows the next prompt. Try `cat` followed by ENTER and then ~?
It'll still work. OpenSSH doesn't care about output (for ~ stuff), only input, so if you type ~. it will close the connection.
Re: SSH Secret Menu
#39Those aren’t “secret”, they’re obviously borrowed from rsh — oh that’s right, I’m old.
Re: SSH Secret Menu
#40Hidden or undocumented features like this always have a strange appeal. Part of it is nostalgia for older software where small Easter eggs or experimental features would sometimes ship in production builds.
Here's 15-year old HN link about it: http://grack.com/blog/2011/02/23/ssh-escape-sequences-or-don...