SSH from Remote
ForwardAgent
To ssh or rsync from a remote machine, do not copy your private key.
Your ssh key must never leave your laptop. Ideally it should even be
hardware protected, e.g. Yubikeys support ssh. Instead, use ssh-agent
to forward authentication requests back to your laptop, e.g.
On your laptop:
ssh-add (Adds your default key to the local agent)
ssh -A server_a (-A, or "ForwardAgent yes" in .ssh/config)
On server_a:
ssh server_b
Visualization
ssh -L opens a local port. Everything that you send to that port is put through the ssh connection and leaves through the server. If you do, e.g., ssh -L 4444:google.com:80, if you open http://localhost:4444 on your browser, you'll actually see google's page.
Ex)ssh hongsuk@some.remote.server -L 8080:127.0.0.1:8080 -A