CentOS 7
Ads

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

[cent@dlp ~]$
eval `ssh-agent`

Agent pid 2168
# add Identity

[cent@dlp ~]$
ssh-add

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

[cent@dlp ~]$
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

[cent@dlp ~]$
ssh node01.srv.world hostname

node01.srv.world
# exit from SSH-Agent

[cent@dlp ~]$
eval `ssh-agent -k`

Agent pid 2168 killed
 
Tweet