I just have to share this: have you ever been in a situation where the SSH connection locked up, and you were not able to send any more commands? And particularly, you were not able to send commands like Ctrl+c or similar to close the session?
In such situations I usually had to close the terminal - which is not always fortunate.
But: you can just close the SSH session with an escape sequence: next time, just do Enter+~+. !So just press the enter key, followed by the tilde key followed by the dot - and you should be back to your terminal!
I use SSH on a daily base for more than ten years, but never knew about that!
And from the telnet(1) man page, I now know that telnetalso has such a mode, optionally replacing its normal ^] escape sequences, which can be activated by passing it the -r switch. The switch is a nod to the mode’s origins with the rlogin command, from which ssh also apparently derives its escape sequences. #WhoKnew?
…Of course, now that I do know, I can’t really say that I’ll ever have call to use the ssh escapes. But, hey, at least now I know they’re there. Until I forget them a week from now.
I didn’t knew, so it’s ok. I’m just surprised. Other parts of the Fedora universe very much welcome blogs - planetfedora is there for a reason. After reading “Discourse is not only a question and answer platform” in the “Please read me first!” I was under the impression that ask.fedora is not just “question, anser” - for that exact reason I shared my experience instead of asking a question…
Planetfedora is literally a blog aggregator.
However, if you do add your blog to planet-fedora it must follow the Code of Conduct, and will be removed very swiftly if it doesn’t.
No, you misunderstand me—sharing your experience is perfectly OK. That is encouraged.
The specific bit where you linked to your personal blog is what we frown down upon. If allowed, it very quickly turns into lots of spam posts, and then the admins have to go through each link to see whether it is relevant or not----which we really cannot actively keep doing. (Also note that many blogs make money from people viewing them, and so using community forums to increase viewership is frowned upon—but again, who decides what personal blog is OK, and how?)
In general, any forum you use will request you to write the solution on the forum itself instead of documenting it in a personal blog and linking to it. It’s an unsaid rule, but sure we can make it a proper written down rule if you think that’ll be better?
Yes, but on the flip side going down the path where everything is a written rule instead of a guideline that is understood by community members defeats the purpose of the idea. Rules are blindly followed, while such unsaid guidelines are passed on from community member to community member generally with an understanding of why it is so.
Let’s leave it as an unsaid guideline for now. If we see it becoming common practice for users to post links to their blogs, we’ll make it a rule to make it enforceable?
I start lines with a tilde often enough to be annoyed by the need of having to hit it twice, so I changed my config to use the backtic ` instead of ~.
And I’ve been in situations where I ran ssh host1, started tmux, and issued ssh host2 in one of the panes. In those situations, it’s handy to have a separate escape key for the second ssh command, otherwise it’s likely you’ll prematurely disconnect the first session (with the tmux session).
You know you don’t actually have to hit it twice, right? The ~ won’t show up immediately, but if you follow it with anything other than one of the supported escape characters both the ~ and the character that followed it will be delivered to the remote end. (So, you can follow it with anything other than . B C R V v # ^ & ? … or Ctrl+z, but that seems like even less of a worry) .
(Which I guess explains how I went so long without realizing the ~ escapes were even there. If I type ~ at the start of a line it’s usually the beginning of something like ~/path/to/executable ..., and they were smart enough not to make / one of the escapes.)
I do know about the “fall-through” behaviour and that’s part of what bugs me about it. It’s worse in vim where ~ changes the case of the letter under the cursor. I use it quite often, and don’t like the fact that I sometimes have to hit it twice, sometimes only once.
All in all, small annoyances, but enough for me to remap the Escape character (and, as mentioned previously, with nested SSH sessions it’s handy to have different escape characters for the different levels of nesting).
(Being a pre-SSH-era veteran, I should probably change the escape character to Ctrl + ], but I still use telnet from my ssh session often enough to not go there.)
Well, Ctrl + \ traditionally sends the SIGQUIT signal which sometimes comes in handy. I figured that Ctrl + Space (aka ^@) would be pretty rare: it sends a NULL character. I haven’t really needed that, so I figured it would make an excellent command prefix for screen/tmux.