Live data from Hacker News

SSH Secret Menu

twitter.com

61–70 of 184 posts

Re: SSH Secret Menu

#61
post #22

I'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…

    Host *
        ServerAliveInterval 25

Re: SSH Secret Menu

#62
post #52
post #44

Earlier quoted context omitted.

Note this is only an issue if not using IPv6. CGNAT is for access to legacy IPv4 only.

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?

Re: SSH Secret Menu

#63

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

man ssh_config is even more interesting and hidden ProxyCommand is fun

Honest question, why is ProxyCommand `fun`? What do I get out of ProxyCommand that i do not get out of setting the correct order for ProxyJump and doing an ssh finalhost -- domy --bidding?

Re: SSH Secret Menu

#65

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.

Do we still have those? I think it was common in late '90s, due to GNU trying to get `info` gain moment but nowadays?

Re: SSH Secret Menu

#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.

Re: SSH Secret Menu

#67

Earlier quoted context omitted.

man ssh_config is even more interesting and hidden ProxyCommand is fun

Honest question, why is ProxyCommand `fun`? What do I get out of ProxyCommand that i do not get out of setting the correct order for ProxyJump and doing an ssh finalhost -- domy --bidding?

ProxyJump is a newer functionality. There used to be only ProxyCommand. ProxyJump is a shortcut for the usual way to use ProxyCommand to connect through a bastion host but ProxyCommand is more flexible. For example with ProxyCommand you can run any command to connect to the remote host. ProxyJump only connects over ssh. I think I replaced all my ProxyCommand with ProxyJump because I don't need much else than the normal use case.

Re: SSH Secret Menu

#68

Earlier quoted context omitted.

man ssh_config is even more interesting and hidden ProxyCommand is fun

Honest question, why is ProxyCommand `fun`? What do I get out of ProxyCommand that i do not get out of setting the correct order for ProxyJump and doing an ssh finalhost -- domy --bidding?

ProxyCommand allows you to use any command to setup a connection. Not necessarily an ssh command, like ProxyJump. It can be any command, as long as it receives on stdin and produces on stdout, it can act like a TCP connection.

ProxyJump is a special case of `ProxyCommand ssh -p @`. Can't replace the `ssh` in there when using ProxyJump.

Re: SSH Secret Menu

#69

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

Who doesn’t want you to know? Well, obviously, the man. That’s why you type man ssh, you’re forcing the man to tell you what he knows.
Post reply on HN