Earlier quoted context omitted.
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.
I find it odd that you would have commands in ~/bin but not have it be the highest priority in your PATH. I use ~/.local/bin, but would never type it because i wouldn't have bins that overlap shell commands and no other path would have priority.
SSH Secret Menu
41–50 of 184 posts
Re: SSH Secret Menu
#42I'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
#43Re: SSH Secret Menu
#44I'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.
If hung SSH connections are common it's likely due to CGNAT which use aggressively low TCP timeouts. e.g. I've found all UK mobile carriers set their TCP timeout as low as 5 minutes. The "default" is supposed to be 2 hours, you could literally sleep your computer, zero packets, and an SSH connection would continue to work an hour later, and generally speaking this is still true unless CGNAT is in the way. If you are…
CGNAT is for access to legacy IPv4 only.
Re: SSH Secret Menu
#45Another neat thing I noticed while playing with it just now: there's an option to enter ~ twice to send a literal ~, but usually you don't have to do this when typing something like 'ls ~' in a regular session. Not only does the ~ have to be the first character on a line to start an escape sequence, but typing on a line, backspacing all the way to the start and then typing ~ also sends a literal tilde. It only triggers the escape sequence if the ~ is the chronologically first character after a newline (or first in the session), which is an unlikely thing to type into a shell in a normal session. Good choice of UI, both the character and the state machine.
Re: SSH Secret Menu
#46Yep the menu is handy for ssh tunneling. Maybe not a lot of people doing that these days though with stuff like dev tunnels and Tailscale.
I typically just create a "new" connection in a separate tab when I want to add tunneling. I put new in quotes because I use another little-known feature, "ControlMaster". Multiplexes multiple connections into one, it makes making " new" sessions instant (can also be configured to persist a bit after disconnecting). Also useful for tab-completing remote paths. It does not prompt for authentication again, though. And…
Re: SSH Secret Menu
#47Find the HIDDEN SECRETS that THEY DON'T WANT YOU TO KNOW! $ man ssh
Re: SSH Secret Menu
#48Yep the menu is handy for ssh tunneling. Maybe not a lot of people doing that these days though with stuff like dev tunnels and Tailscale.
I typically just create a "new" connection in a separate tab when I want to add tunneling. I put new in quotes because I use another little-known feature, "ControlMaster". Multiplexes multiple connections into one, it makes making " new" sessions instant (can also be configured to persist a bit after disconnecting). Also useful for tab-completing remote paths. It does not prompt for authentication again, though. And…
Is this what secureCRT used as well? I remember this being all the rage back when I used windows, and it allowed this spawn new session by reusing the main one.
Re: SSH Secret Menu
#49Find the HIDDEN SECRETS that THEY DON'T WANT YOU TO KNOW! $ man ssh
Jackpot if they're just a pointer to an 'info' page.
Re: SSH Secret Menu
#50Find the HIDDEN SECRETS that THEY DON'T WANT YOU TO KNOW! $ man ssh
I blew a few minds a week ago when I told my younger coworkers about man pages. I hit ‘em with the `man man` and one dude was like “whoa!”