News for hackers. Stuff that matters.
Re:New startup sells coffee through SSH by bananskalhalk on Wednesday May 01, 2024 @02:56PM (#40227674)
*disable ssh agent FORWARDING.

Which honestly should always be disabled. There are no trusted hosts.

Re:New startup sells coffee through SSH by tichiian on Wednesday May 01, 2024 @03:01PM (#40227754)
That's baby+bathwater.

Just use ssh-add -c to have the ssh-agent confirm every use of a key.

Re:New startup sells coffee through SSH by bananskalhalk on Wednesday May 01, 2024 @03:10PM (#40227881)
TIL. Thanks! Gonna do wonders when working at places where I can't use a hardware key with physical confirmation of use.

My assessment still stands. Use proxyjump (-J) instead of proxy command whenever possible.

Re:New startup sells coffee through SSH by tichiian on Wednesday May 01, 2024 @03:31PM (#40228189)
What can also help is specifying the right options right in ~/.ssh/config for certain hosts and domains: E.g. do "ForwardAgent no" globally, use a "Match *.my-trustworthy-company-domain.com" block and add "ForwardAgent yes" there.

Also very good for other options that are useful but problematic when used with untrustworthy target hosts, like ForwardX11, GSSAPIAuthentication, weaker *Algorithms (e.g. for those old Cisco boxes with no updates and similar crap).

Another neat trick is just using a ""Match *.my-trustworthy-company-domain.com" block" with an "IdentityFile ~/.ssh/secret-company-internal-key" directive. That key will then be used for those company-internal things, but not for any others, if you don't add it to the agent.

Re:New startup sells coffee through SSH by yjftsjthsd-h on Wednesday May 01, 2024 @05:47PM (#40229929)
Whenever possible, yes, but AIUI it's not always possible; the one use case for which I believe full-on forwarding is required is using your personal credentials to transfer data between two remote servers (ex. rsync directly between servers). If there's a way to do that I would actually much appreciate somebody telling me, but I have looked and not found a way.
Re:New startup sells coffee through SSH by deeblering4 on Wednesday May 01, 2024 @03:28PM (#40228155)
I just got a corporate buzzword bingo!
Re:New startup sells coffee through SSH by tichiian on Wednesday May 01, 2024 @03:33PM (#40228224)
Sorry, English is not my native language. I know I sometimes sound strange because most of my use of the language is around the internet and at work, not that much casual "normal" conversation.
Re:New startup sells coffee through SSH by bee_rider on Wednesday May 01, 2024 @03:43PM (#40228369)
English is my native language and I have no idea what that person was talking about. Your post is fine.
Re:New startup sells coffee through SSH by hunter2_ on Wednesday May 01, 2024 @04:19PM (#40228814)
I think that person was talking about having had 4 out of 5 squares in a line on their bingo card already, and stumbling across "baby+bathwater" earned them bingo. The card is metaphorical though... more of a mental buffer that just overflowed.
Re:New startup sells coffee through SSH by bee_rider on Wednesday May 01, 2024 @04:48PM (#40229200)
That makes more sense than my solution.

As far as I’m concerned the baby and the bath water is just a normal expression.

I thought it was something about the use of “confirm,” haha.

Re:New startup sells coffee through SSH by hoistbypetard on Wednesday May 01, 2024 @04:20PM (#40228827)
Mine too, and I think the post is fine also, but I have some idea of what that person was talking about. For a while, in some corporate environments, it was a recurring phenomenon to hear someone dismiss an urge to be cautious by saying "You're throwing out the baby with the bathwater."

So I can see where someone might count it toward buzzword bingo. But this post also offered an alternate solution when saying "baby+bathwater", so the bingo caller should refuse to score this one.

Re:New startup sells coffee through SSH by tomcam on Wednesday May 01, 2024 @05:01PM (#40229364)
Your English is fine. That person was violating HN rules about snark (“Be kind. Don't be snarky. Converse curiously; don't cross-examine. Edit out swipes.”)

Learned that rule the hard way. It’s crucial to the success of HN and I am grateful dang corrected me.

Re:New startup sells coffee through SSH by deeblering4 on Friday May 03, 2024 @09:26AM (#40247417)
I don't see a rule where joking is prohibited. People sure love their buzzwords though. Must bring them a feeling of synergy in these unprecedented times :)

Glad that at least a few people above got the joke

Re:New startup sells coffee through SSH by tomcam on Friday May 03, 2024 @05:28PM (#40252587)
Did I mention joking?
Re:New startup sells coffee through SSH by deeblering4 on Monday May 06, 2024 @10:27AM (#40275095)
In your list of prohibited items? No. That's my point.
Re:New startup sells coffee through SSH by lrvick on Thursday May 02, 2024 @06:34AM (#40234627)
Or use a hardware backed ssh key you have to tap once for every use, like a Yubikey or Nitrokey.
Re:New startup sells coffee through SSH by sva_ on Wednesday May 01, 2024 @04:05PM (#40228652)
I've found myself to be much more comfortable to just define all my private keys in ~/.ssh/config on a host-by-host basis.
Re:New startup sells coffee through SSH by jmole on Wednesday May 01, 2024 @07:23PM (#40230840)
AFAIK, this doesn't solve the SSH agent problem - the problem is the agent has access to all of those keys regardless of the host you connect to.

So forwarding your SSH agent means an administrator of the system you're connected to could use any of those host keys loaded in the agent to connect to their associated machine.

Re:New startup sells coffee through SSH by derefr on Wednesday May 01, 2024 @03:05PM (#40227797)
> There are no trusted hosts.

...your own (headless) server that's in the same room as you, when you're using your laptop as a thin-client for it?

Re:New startup sells coffee through SSH by dotancohen on Wednesday May 01, 2024 @03:31PM (#40228198)
Depending on what it's serving, and how up to date it is, and who else is on that network and can access the server, and who else can come into that same room when you're not there, and from where you get the software that you install on that server... it might be less trustworthy than you think.
Re:New startup sells coffee through SSH by jstanley on Wednesday May 01, 2024 @04:51PM (#40229243)
But if that's your standard then the laptop you're connecting from is not trusted either, and then you're not even allowed to use your own keys.

You're allowed to draw sensible boundaries.

Re:New startup sells coffee through SSH by xandrius on Wednesday May 01, 2024 @03:09PM (#40227856)
With all these recent exploits, I wouldn't even be 100% sure of that.
Re:New startup sells coffee through SSH by wolletd on Wednesday May 01, 2024 @03:36PM (#40228265)
But if I can't trust even that host, I also can't trust the host I'm working on and which doesn't need agent forwarding to access my SSH agent.
Re:New startup sells coffee through SSH by hot_gril on Wednesday May 01, 2024 @04:24PM (#40228887)
Trusting one host is safer than trusting two hosts.
Re:New startup sells coffee through SSH by jethro_tell on Wednesday May 01, 2024 @03:39PM (#40228292)
This is where certs are nice, sign one every morning with a 8/12 hour TTL
Re:New startup sells coffee through SSH by quibuss on Thursday May 02, 2024 @04:44AM (#40234036)
Interesting idea. Does need some automation though to make it practical irl.
Re:New startup sells coffee through SSH by contingencies on Wednesday May 01, 2024 @06:26PM (#40230381)
Default for the last 24 years according to https://github.com/openssh/openssh-portable/blame/385ecb31e1...