OpenSSH : Use SSH-Agent2023/02/20 |
Use SSH-Agent to automate inputting Passphrase on SSH Key Pair authentication.
SSH-Agent is useful for users who set SSH Key Pair with Passphrase. |
|
[1] | This is some example to use SSH-Agent. |
# run SSH-Agent [alma@dlp ~]$ eval $(ssh-agent) Agent pid 1826 # add passphrase [alma@dlp ~]$ ssh-add Enter passphrase for /home/alma/.ssh/id_rsa: Identity added: /home/alma/.ssh/id_rsa (alma@dlp.srv.world) # verify [alma@dlp ~]$ ssh-add -l 3072 SHA256:yYOKaIcT25Jd0ZaOOYLa+rgrU0c/M/rVmJx4q4MVZB0 alma@dlp.srv.world (RSA) # try to connect without inputting passphrase [alma@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 [alma@dlp ~]$ eval $(ssh-agent -k) Agent pid 1826 killed |
Sponsored Link |
|