Live data from Hacker News

SSH Secret Menu

twitter.com

101–110 of 184 posts

Re: SSH Secret Menu

#102
it starts with a pretty common char, but almost never gets in the way to the point I forget it exists. Meanwhile docker -t uses ^P which I use all the time for history instead of arrow keys. It's possible to configure it, but it's not worth the hassle on servers. Really, really annoying.

Re: SSH Secret Menu

#103

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.

The real jackpot is if they're the same as the --help command

I used to think this and used things like `help2man`. I now disagree, but throwing it out there.

Re: SSH Secret Menu

#104
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 @@ #…

The temporary address doesn't stay active while there's a connection on it? I think that would be the actual "fix".

Re: SSH Secret Menu

#105

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?

I came across ProxyCommand earlier this week, funnily enough. I have Cloudflare Zero Trust set up with an SSH service[0], and have the server firewall drop all incoming traffic. That helps reduce my attack surface, since I don't have any incoming ports open.

[0]: https://developers.cloudflare.com/cloudflare-one/networks/co...

Re: SSH Secret Menu

#106

Earlier quoted context omitted.

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!

my manpager is `vim -`, can't beat that

You probably can — by using neovim:

https://wiki.archlinux.org/title/Neovim#Use_as_a_pager

https://neovim.io/doc/user/filetype/#_man

I've also been running (neo)vim as a manpager. You get the same features as with vim (like easily copying text or opening referenced files/other manpages without using the mouse), but neovim also parses the page and creates a table of contents, which can be used for navigation within the page. It doesn't always work perfectly, but is usually better than nothing.

Re: SSH Secret Menu

#107

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?

I use ProxyCommand in edge-case devices where key auth is not an option and the password is not controlled by me. ProxyCommand points to a script the retrieves the password from the vault, puts it on the clipboard for pasting, reminds me via stderr it's done so, and then proxies the connection.

Re: SSH Secret Menu

#108

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

`pgrep`/`pkill` HATE this trick! Learn how this renegade developer (relatively) easily exits their hanging SSH sessions without restarting their laptop.

Re: SSH Secret Menu

#109
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 ~?

No need – your local ssh client, which interprets the escape sequence, doesn't have any understanding of whatever mode the remote session might currently be in.

The point of the return is to prime it to accept the start of a new escape sequence. Presumably the idea is that `~.` is not completely unlikely to occur as part of text entered remotely, but less so at the beginning of a new line.

Post reply on HN