Fedora 31
Sponsored Link

OpenSSH : Use SSH-Agent2019/11/12

 
Use SSH-Agent to automate inputting Passphrase on SSH Key Pair authentication.
Using SSH-Agent is valid for users who set SSH Key Pair with Passphrase.
[1] This is some example to use SSH-Agent.
# run SSH-Agent

[fedora@dlp ~]$
eval $(ssh-agent)

Agent pid 1416
# add passphrase

[fedora@dlp ~]$
ssh-add

Enter passphrase for /home/fedora/.ssh/id_rsa:
Identity added: /home/fedora/.ssh/id_rsa (fedora@dlp.srv.world)
# verify

[fedora@dlp ~]$
ssh-add -l

3072 SHA256:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx fedora@dlp.srv.world (RSA)
# try to conenct wuthout inputting passphrase

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

node01.srv.world
# stop SSH-Agent

# if not execute it, SSH-Agent process remains even if you logout System, be careful

[fedora@dlp ~]$
eval $(ssh-agent -k)

Agent pid 1416 killed
Matched Content