SSH - ssh-agent

> SSH (Secure Shell) - Remote Access

1 - About

ssh-agent is the authentication agent of the Openssh ssh cli .

It stores un/desencrypted private keys in memory, and communicates with SSH clients via Unix_domain_socket

Advertising

3 - Management

3.1 - Start

  • Start the ssh-agent in the background.
eval `ssh-agent`
# or ssh-agent bash
# or eval "$(ssh-agent -s)"

3.2 - Status

Test if SSH agent is running (If nothing is returned, then ssh-agent is not running)

echo "$SSH_AUTH_SOCK"
/tmp/ssh-rfSUL1ldCldQ/agent.1792

3.3 - Add a key

  • Add SSH private key to the ssh-agent
ssh-add ~/.ssh/id_rsa

3.4 - List the keys

ssh-add -l

4 - Documentation / Reference

Advertising
ssh/ssh-agent.txt · Last modified: 2019/01/23 13:32 by gerardnico