Live data from Hacker News

SSH Secret Menu

twitter.com

171–180 of 184 posts

Re: SSH Secret Menu

#171
post #147

I intended to post in defense of manpages. I love manpages. I think most open-source manpages are high-quality, and a few are really outstanding. "It's easier to ask an AI" can be true without implying that manpages are bad. However, "man" the tool does have issues, and one of them bit me just now. So, I didn't know about openssh client escapes like ~?. I thought, "surely that's in the manpage?" I opened the manpage…

Manpages are both good and awful. If you already know how to use the command and you just need a refresher on how to enable the diagnostic option for wolves, they're fine. OTOH if you don't know how to use the command they're terrible, just an endless catalogue of incomprehensible options scrolling past. Problem is that that's what Dennis and Ken created in 1929 for use on ASR-33s and it hasn't been updated since. 99% of the time when I need to use some new unfamiliar command I go to whatever DDG pops up, usually StackOverflow, for a guide on usage.

Re: SSH Secret Menu

#172

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.

Probably getting closer to 30 than 25 for me. And I used rsh before that where guess what was used to escape the input.

https://en.wikipedia.org/wiki/Berkeley_r-commands

Re: SSH Secret Menu

#173
post #113
post #88

Earlier quoted context omitted.

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

It would also seem to break address privacy (usually not much of a concern if you authenticate yourself via SSH anyway, but still, it leaks your Ethernet or Wi-Fi interface's MAC address in many older setups).

This is a good argument for not making it the default, but it would be nice to have it as a command line switch.

Re: SSH Secret Menu

#174
post #159
post #147

I intended to post in defense of manpages. I love manpages. I think most open-source manpages are high-quality, and a few are really outstanding. "It's easier to ask an AI" can be true without implying that manpages are bad. However, "man" the tool does have issues, and one of them bit me just now. So, I didn't know about openssh client escapes like ~?. I thought, "surely that's in the manpage?" I opened the manpage…

Thanks for the suggestions. Invoking man with "-E ascii" fixed this for me. It sounds like some distributions do have this fixed in their default settings. I'm on Cygwin 3.6.6; maybe it's mostly a Cygwin thing.

yeah it sounds like your environment is doing some weird mangling of the encoding. Maybe consider adding an 'alias man="man -E ascii"' into your .bashrc

You might also consider seeing if it's any different in WSL. Or you could, you know, just use Linux ;P

Re: SSH Secret Menu

#175

Wow, never knew this... That said I'm not sure if I'll remember using it as my muscle memory is already trained to kill hung processes via ctrl-b s, ctrl-k, ctrl-b x (in tmux).

Yeah I discovered ~? a while back and had similar concerns, so I added:

  alias ssh="echo 'dont forget: ~? for SSH escapes!'; /usr/bin/ssh "
into my .bashrc

Re: SSH Secret Menu

#176
post #155

Don't tell people this. In a minute you'll realize that this menu can only mean that ssh runs multiple channels, and so you can start up other things over an established ssh connection. Then the firewall guys will realize that they really can't allow ssh ... let's just not go there. Working at a bank is annoying enough already.

When your firewall guys "block" ssh (or anything else), all you need to do is run your ssh server on port 443 and then `ssh -p 443 user@host`.

Running on 443 means it will blend in with https traffic, making it much more difficult for them to detect and block (I've never actually seen anywhere that can detect/block it - you'd need to be doing deep packet inspection on encrypted traffic) :)

Re: SSH Secret Menu

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

At least on FI/SE layout, ~ is a dead key. So it needs a space after it.

Still not as bad as brackets and infinitely better than {} on a macbook.

Re: SSH Secret Menu

#179
post #155

Don't tell people this. In a minute you'll realize that this menu can only mean that ssh runs multiple channels, and so you can start up other things over an established ssh connection. Then the firewall guys will realize that they really can't allow ssh ... let's just not go there. Working at a bank is annoying enough already.

When your firewall guys "block" ssh (or anything else), all you need to do is run your ssh server on port 443 and then `ssh -p 443 user@host`. Running on 443 means it will blend in with https traffic, making it much more difficult for them to detect and block (I've never actually seen anywhere that can detect/block it - you'd need to be doing deep packet inspection on encrypted traffic) :)

Nice. But is it possible to run both ssh and https (ideally with auto-certbotting) on the same port?

Re: SSH Secret Menu

#180
post #74

Earlier quoted context omitted.

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?

You can get a lot more out of ProxyCommand. For example, you can run SSH over non-IP protocols, such as serial, Bluetooth RFCOMM for embedded boards, or vsock for virtual machines without networking set up at all. The latter is built into and setup up automatically by systemd: https://www.freedesktop.org/software/systemd/man/257/systemd...

Much appreciated!
Post reply on HN