Live data from Hacker News

SSH Secret Menu

twitter.com

81–90 of 184 posts

Re: SSH Secret Menu

#81
post #26

I'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 ~?

Same with me, I'll still instinctively go for ~. when a connection has hung / dropped (usually because of a NAT via a rebooted firewall), but never even considered how ~ doesn't normally cause an issue. Never knew it had to be immediately following a newline. Also never knew about the other options, ~^Z in particular looks useful.

I wonder if anyone still remembers the ctrl-[ sequence in telnet. I think I only ever used the quit command in that though.

Re: SSH Secret Menu

#82

Find the HIDDEN SECRETS that THEY DON'T WANT YOU TO KNOW! $ man ssh

Many Linux man pages have the thoroughness of a fortune cookie, so I can understand the skepticism. Jackpot if they're just a pointer to an 'info' page.

I was never able to properly parse large man pages, I'm so happy that llms can now prepare half a usable command without spending an hour reading a time without a single usage example.

Re: SSH Secret Menu

#83

I've been using the ~. shortcut for a while, but somehow escaped learning about the help menu. Another 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, ba…

The drawback is that if you think your session is hanging and want to bail with ~., you have to press enter, which might actually make it to the server and execute something.

Re: SSH Secret Menu

#84

I've been using the ~. shortcut for a while, but somehow escaped learning about the help menu. Another 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, ba…

> typing on a line, backspacing all the way to the start and then typing ~ also sends a literal tilde

for the younger readers, yes, because in terminal echo mode, "backspacing" does not clear your terminal line buffer, those characters backspaced are already sent on the line. if you ever seen a misconfigured terminal, it hints what's going on, like:

user@host$ ls ~/^?^?^?^?^?~/a.out

^? is backspace's control char.

that is ssh watches what you type, not what is on the screen (terminal).

Re: SSH Secret Menu

#85

I've been using the ~. shortcut for a while, but somehow escaped learning about the help menu. Another 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, ba…

The drawback is that if you think your session is hanging and want to bail with ~., you have to press enter, which might actually make it to the server and execute something.

many get used to Ctrl-U, Return, ~, period keystroke sequence for this.

Re: SSH Secret Menu

#86
post #82

Earlier quoted context omitted.

Many Linux man pages have the thoroughness of a fortune cookie, so I can understand the skepticism. Jackpot if they're just a pointer to an 'info' page.

I was never able to properly parse large man pages, I'm so happy that llms can now prepare half a usable command without spending an hour reading a time without a single usage example.

What I usually do when I have to read large man pages like bash(1) is I read them as PDFs:

man -Tpdf bash | zathura -

Replace zathura with any PDF viewer reading from stdin or just save the PDF. Hope that can be useful to someone!

Re: SSH Secret Menu

#87
post #51
post #38

Earlier quoted context omitted.

It does not. open ssh linux to mac, typing ~ just types it on fish shell prompt. It works after`cat` followed by ENTER

Just type without cat, your shell will show you another prompt, and the ssh escape command will also work.

No they are correct, fish seems to intercept this or something like that. Only works with cat.

Re: SSH Secret Menu

#88
post #62
post #52

Earlier quoted context omitted.

Well, for different reasons, but you have similar issues with IPv6 as well. If your client uses temporary addresses (most likely since they're enabled by default on most OS), OpenSSH will pick one of them over the stable address and when they're rotated the connection breaks. For some reason, OpenSSH devs refuse to fix this issue, so I have to patch it myself: --- a/sshconnect.c +++ b/sshconnect.c @@ -26,6 +26,7 @@ #…

Interesting! Is there anywhere a discussion around their refusal to include your fix?

See this, for example: https://groups.google.com/g/opensshunixdev/c/FVv_bK16ADM/m/R...

It boilds down to using a Linux-specific API, though it's really BSD that is lacking support for a standard (RFC 5014).

Re: SSH Secret Menu

#89
post #66
post #19

It's like Ctrl + ] on telnet. The good old times!

Unlike CTRL ], at least ~. doesn't require that I press two modifiers at the same time ... CTRL ALTGR $. Because people who define those kinds of shortcuts never consider how they might work on non-QWERTY layouts.

Try Ctrl-5.

Re: SSH Secret Menu

#90

Find the HIDDEN SECRETS that THEY DON'T WANT YOU TO KNOW! $ man ssh

Many Linux man pages have the thoroughness of a fortune cookie, so I can understand the skepticism. Jackpot if they're just a pointer to an 'info' page.

The real jackpot is if they're the same as the --help command
Post reply on HN