CentOS 7
Sponsored Link

Use SSH-Agent
2015/04/15
 
Use SSH-Agent to automate inputting passphrase on key-pair authentication.
[1]
[2] How to use SSH-Agent.
# start SSH-Agent

[[email protected] ~]$
eval `ssh-agent`

Agent pid 2168
# add Identity

[[email protected] ~]$
ssh-add

Enter passphrase for /home/cent/.ssh/id_rsa:
Identity added: /home/cent/.ssh/id_rsa (/home/cent/.ssh/id_rsa)
# confirm

[[email protected] ~]$
ssh-add -l

2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:4c:b2 /home/cent/.ssh/id_rsa (RSA)
# try to conenct with SSH without passphrase

[[email protected] ~]$
ssh node01.srv.world hostname

node01.srv.world
# exit from SSH-Agent

[[email protected] ~]$
eval `ssh-agent -k`

Agent pid 2168 killed