💾 Archived View for gemini.ctrl-c.club › ~cdrmack › posts › 2024-05-17_ssh_agent.gmi captured on 2024-05-26 at 15:33:24. Gemini links have been rewritten to link to archived content

View Raw

More Information

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

ssh agent

To use `ssh(1)' we first need to start `ssh-agent(1)'. We use `-c' to generate C-shell commands on stdout for csh-style shells and `-s' for Bourne-shell.

eval `ssh-agent -c`

With ssh-agent running we need to `ssh-add(1)' our private key that we want to use.

ssh-add ~/.ssh/<your_private_key>

That's it, `ssh-agent' will now hold that private key and use it for public key authentication. You can list all identities currently represented by the agent with the `ssh-agent -l' command.

To set this up automatically on login, just add these commands to your shell configuration file. As an example, for `tcsh(1)' use `~/.tcshrc'.