News for hackers. Stuff that matters.
Re:Remote Code Execution in OpenSSH’s forwarded SSH-agent by cassianoleal on Wednesday July 19, 2023 @02:31PM (#36791074)
As others have pointed out already, JumpHost or -J is the preferred way.
Re:Remote Code Execution in OpenSSH’s forwarded SSH-agent by gunapologist99 on Wednesday July 19, 2023 @04:13PM (#36792517)
I agree!

The Github example complicates things, but the correct solution is actually another key:

Generate a separate private key on foo and place that one in github, ideally per project as a deploy key.

Re:Remote Code Execution in OpenSSH’s forwarded SSH-agent by lxgr on Wednesday July 19, 2023 @07:37PM (#36795041)
Please stop calling this the "correct" solution. It might work for you; it's not a general rule or widely accepted best practice.

Generating a key per host is just a different security model than key forwarding, and arguably a worse one if key forwarding is done defensively (i.e. forward a separate key, with only those permissions you would give to a key present on the connected host itself).

Re:Remote Code Execution in OpenSSH’s forwarded SSH-agent by pritambaral on Thursday July 20, 2023 @09:29AM (#36800149)
> Generate a separate private key on foo ...

That is a TERRIBLE idea, if foo can be compromised. Even if you secure the private key with a passphrase, it still needs to be loaded into foo's memory, by a binary resident on foo, which can be used to exfiltrate that private key.

If you're confident foo cannot be compromised, then the whole point is moot anyway.