OpenSSH : Use SSH-Agent2021/07/19 |
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] | Follows are some examples to use SSH-Agent. |
# run SSH-Agent [rocky@dlp ~]$ eval $(ssh-agent) Agent pid 1623 # add passphrase [rocky@dlp ~]$ ssh-add Enter passphrase for /home/rocky/.ssh/id_rsa: Identity added: /home/rocky/.ssh/id_rsa (rocky@dlp.srv.world) # verify [rocky@dlp ~]$ ssh-add -l 3072 SHA256:3f+NQ4SaEtBeF+PosfbNF5KbmiJ+S8uv9Lw+L2kWlHw rocky@dlp.srv.world (RSA) # try to conenct without inputting passphrase [rocky@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 [rocky@dlp ~]$ eval $(ssh-agent -k) Agent pid 1623 killed |
Sponsored Link |