Re:Show HN: My SSH server knows who you are
by hamburglar on Wednesday August 05, 2015 @05:13AM
(#10008643)
Not exactly. The remote host, which you have forwarded your agent to, tries to log onto your production host using your public key, and when the production host sends it a signing challenge to prove it has the authority of your private key, it can simply ask your ssh agent to do that signing. Once that is complete, you are logged in and the session has a session key that has nothing to do with your pub/private keys. The ssh agent does not do decryption, it just gets the session started.
Re:Show HN: My SSH server knows who you are
by micaeked on Wednesday August 05, 2015 @06:18AM
(#10008787)
Another example is if I want to transfer something from server A to server B, without it going through my shitty little pipe, and without storing the private key on either server.
Re:Show HN: My SSH server knows who you are
by throwaway2048 on Wednesday August 05, 2015 @02:25AM
(#10008266)
its very useful for so called "Bastion Hosts", an SSH server that allows further access into the network and is totally locked down.
Re:Show HN: My SSH server knows who you are
by beagle3 on Wednesday August 05, 2015 @06:27AM
(#10008822)
I know it as a "jump host" or "jump box". Regardless, it's still not a good idea to have agent forwarding - what about the boxes you forward to? Do you trust them not to abuse the forwarding trust (Is there a way to limit forwarding trust to just one machine?)
Also, I used to add every jump combination into my .ssh/config file, but came across a wonderful trick that makes it unnecessary: https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Proxies_and_J...
Re:Show HN: My SSH server knows who you are
by creshal on Wednesday August 05, 2015 @04:22AM
(#10008511)
You don't need agent forwarding for that. Just use ssh's dumb tcp forwarding and keep your agent on your local host.
Ex.:
Host bastion.company
ProxyCommand none
Host *.company
ProxyCommand ssh -W %h:%p bastion.company
Re:Show HN: My SSH server knows who you are
by mentat on Wednesday August 05, 2015 @07:48AM
(#10009064)
Because enabling tcp forwarding is so much more safe on a jump box? That's just asking for another pile of unauditable trouble.
Re:Show HN: My SSH server knows who you are
by creshal on Wednesday August 05, 2015 @09:17AM
(#10009467)
Safer than dumping all your private keys onto the jump box and using that to validate the final target? Why yes. This way, your local ssh client validates the final target public key, not the jump box.
Re:Show HN: My SSH server knows who you are
by mentat on Wednesday August 05, 2015 @01:11PM
(#10011240)
The whole point of agent forwarding is that you don't have to place your keys on the jump box. With -c for per use confirmation it seems much more secure.
Re:Show HN: My SSH server knows who you are
by creshal on Thursday August 06, 2015 @02:49AM
(#10014951)
> The whole point of agent forwarding is that you don't have to place your keys on the jump box.
A socket that allows dumping the keys isn't really an improvement. If the box is compromised, agent forwarding can still be abused.
> seems much more secure.
Emphasis on "seems".
Sometimes I feel just so awed at the ingenuity of people, especially with software and computers.