💾 Archived View for sdf.org › beni › tech › sshagent.gmi captured on 2023-09-08 at 16:51:44. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

ssh-agent cheat sheet

Start ssh agent. The reason we need eval is the fact that the ssh-agent command returns environment variables which we need in the current session for SSH to find the agent.

eval $(ssh-agent)

Now we add the ssh keys we want to use

ssh-add

This by default adds the ~/.ssh/id_<algorithm> keys. If you want to add others, you have to specify them explicitly

ssh-add ~/.ssh/<your-private-key>