December 2018
Beginner
826 pages
22h 54m
English
When we initially run ssh-agent, the agent itself is started in the background, and we're given the necessary environment variables for SSH. After they're set, running SSH will cause it to read these variables.
If we add a couple of -vv flags to SSH, we can see it find our key in the agent:
debug2: key: /home/vagrant/.ssh/id_ed25519 (0x55b11351c410), agent
Without the agent loaded, but with the key present, it looks like this:
debug2: key: /home/vagrant/.ssh/id_ed25519 (0x55dea5015410)
The SSH environment variables are also read by ssh-add, which we used to add our key to the agent. To quote the manual page:
Read now
Unlock full access