TrumanWong

ssh-agent

ssh key manager

Supplementary instructions

The ssh-agent command is a program that controls the storage of private keys used for public key authentication. ssh-agent is started at the beginning of the X session or login session, and all other windows or programs are started as client programs and joined to the ssh-agent program. By using environment variables, you can locate the proxy and use it to automatically authenticate when logging into other machines using ssh.

In fact, ssh-agent is a key manager. After running ssh-agent, use ssh-add to hand over the private key to ssh-agent for safekeeping. When other programs require identity verification, you can hand over the verification application to ssh-agent to complete the entire process. certification process.

grammar

ssh-agent [-c | -s] [-d] [-a bind_address] [-t life] [command [arg ...]]
ssh-agent [-c | -s] -k

Options

-a bind_address: bind the agent to the UNIX-domain socket bind_address.
-c: Generate C-shell style command output.
-d: debug mode.
-k: Kill the ssh-agent process.
-s: Generate Bourne shell style command output.
-t life: Sets the default maximum lifespan added to the agent's identity.

Example

Run ssh-agent:

ssh-agent

Run ssh-agent and it will print out the environment and variables it uses.