I have a situation that similar to what is posted here but not quite the same.
I have access to a remote machine A that I connect to from a machine B using a private key with a passphrase. I'd like to give a coworker access to my account on the remote machine A but I obviously I do not like to give him access to my private key that is stored on machine B.
I'd like to do the following but I am confused and do not know how. I'd like to open a tunnel from machine B (middleman) to A (remote) and let my coworker connect to the remote machine using the tunnel. However, in doing so I do not want to give him access to my account on machine B (middleman).
I tried ssh -fNL 12345:A:22 me@A on B but when I issue ssh -p 12345 me@B I get an error saying Permission denied (public key). What am I doing wrong here?