Ssh-agent
Always do not know what is ssh-agent, tonight read a few articles, finally realized.
The general SSH process
- Ssh-keygen generates a public key, note that you can choose a password when you generate the private key, or you can choose no password. The place to OpenSSH cattle is to use key to log in, not to use a password.
- Then do a password-free landing, usually copied to. Ssh/authorized_keys, or with Ssh-copy-id.
In fact, after the second step is done basically do not lose password login. What does it take to ssh-agent and Ssh-add?
In fact, when the Ssh-keygen, you can lose the password, you can not lose the password, just that is the case of not losing the password, then if you lose the password, SSH login will prompt you to enter the password of the private key (do not need to enter the server password). And ssh-agent can avoid the trouble of repeatedly entering the private key.
The usage is simple.
- Ssh-agent
- Ssh-add the private key (this will prompt the password once, then save the password in the cache and then no longer input)
MAC also has a call keychain Access things, is the management of password software, but also through the ssh-add to achieve SSH password-free landing.
Ssh-agent usage