SSH Agent
The SSH Agent is a process that runs when the ssh daemon starts.
Its job is to load all the public and private keys into memory. The SSH client then forwards all auth requests to it.
SSH_AUTH_SOCK environment variable
The SSH_AUTH_SOCK environment variable is set when the agent starts. The client uses its value to know which agent to forward auth requests to.
SSH Agent Forwarding
When you SSH to a remote host with the -A option, a second channel opens to that host.
It also points the SSH_AUTH_SOCK to the SSH agent on your localhost. When the remote host SSHes to another host, the client uses the agent on your original local host.
