Re:Remote Code Execution in OpenSSH’s forwarded SSH-agent
by saltcured on Wednesday July 19, 2023 @06:52PM
(#36794629)
For me, the main use of agent-forwarding is that I need to use a command that expects to use SSH to get between leaf nodes. For example git or rsync CLIs that need to manipulate the local filesystem and tunnel their own protocol over SSH to talk to another remote server.
At times, I've wished for something like uMatrix but for ssh-agent forwarding, so I could have policies for which peer-to-peer authentications should be allowed for which keys and whether these specific uses should require interactive confirmation.
4 server example (this assumes your client can connect to only host C) with the following topology:
ssh configuration snippet: This example is a tree-like topolgy, but you can use host aliases (i.e. add a HostName that is different from the host entry) to define any fixed route to any machine you like.