If I SSH to targethost
via jumphost
with agent forwarding enabled, will jumphost
have access to my SSH key agent?
ssh -A -J user1@jumphost user2@targethost
Is this still secure, if I don't fully trust jumphost
?
If I SSH to targethost
via jumphost
with agent forwarding enabled, will jumphost
have access to my SSH key agent?
ssh -A -J user1@jumphost user2@targethost
Is this still secure, if I don't fully trust jumphost
?
No, the jump host will not have access to the agent. According to the man page:
Note also that the configuration for the destination host (either supplied via the command-line or the configuration file) is not generally applied to jump hosts.
You can check this by the way: in order for sshd
to be able to communicate with the agent, a socket file is needed, which is created (usually) in a /tmp/ssh-*
directory, owned by your user. This will probably be missing on the jump server.