ssh-agent related instructions

SSH proxy related instructions

1) Starting ssh-agent
can be started in the following two ways.
Method 1: Create a subshell, run the ssh-agent process in the subshell, and exit the subshell to automatically end the agent.

ssh-agent $SHELL

Method 2: Start an agent process separately, and use ssh-agent -k to close the corresponding agent when exiting the current shell.

eval `ssh-agent`

2) Close ssh-agent

ssh-agent-k

3) Add the private key to the agent

ssh-add ~/.ssh/id_rsa

4) View the private key in the proxy

ssh-add -l

5) View the public key corresponding to the private key in the agent

ssh-add -L

6) Remove the specified private key

#删除指定私钥
ssh-add -d 私钥

#删除所有私钥
ssh-add -D

Guess you like

Origin blog.csdn.net/weixin_43298913/article/details/104201680