Home | Mirror | Search |
$ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-JvfzN17863/agent.17863; export SSH_AUTH_SOCK; SSH_AGENT_PID=17864; export SSH_AGENT_PID; echo Agent pid 17864;
使ssh-agent生效
eval `ssh-agent`
私鑰管理
neo@netkiller:~$ ssh-add Identity added: /home/neo/.ssh/id_dsa (/home/neo/.ssh/id_dsa) neo@netkiller:~$ ssh-add -l 1024 e5:16:5a:ca:5c:ca:a6:66:89:2d:bf:f2:22:94:3c:d6 /home/neo/.ssh/id_dsa (DSA)
let's add a few one-off keys
$ ssh-add ssh-keys/id*
Delete all keys from the agent
neo@netkiller:~$ ssh-add -D All identities removed.
neo@netkiller:~$ ssh-add -x Enter lock password: Again: Agent locked. neo@netkiller:~$ ssh-add -X Enter lock password: Agent unlocked.
neo@netkiller:~$ ssh-add -t 10 Identity added: /home/neo/.ssh/id_dsa (/home/neo/.ssh/id_dsa) Lifetime set to 10 seconds neo@netkiller:~$ ssh-add -l 1024 e5:16:5a:ca:5c:ca:a6:66:89:2d:bf:f2:22:94:3c:d6 /home/neo/.ssh/id_dsa (DSA) neo@netkiller:~$ ssh-add -l The agent has no identities.