FreeBSD 14
Sponsored Link

OpenSSH : Use SSH-Agent2023/12/19

 
Use SSH-Agent to automate inputting passphrase on key-pair authentication.
Using SSH-Agent is valid for users who set SSH Key Pair with Passphrase.
[1]
[2] This is how to use SSH-Agent.
# start SSH-Agent

freebsd@node01:~ $
eval $(ssh-agent)

Agent pid 1129
# add Identity

freebsd@node01:~ $
ssh-add

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

freebsd@node01:~ $
ssh-add -l

3072 SHA256:uNTwILz1kwqxTKplnlSWcxqEIB0mZQlyERz2wRML1yE freebsd@dlp.srv.world (RSA)
# try to connect with SSH without passphrase

freebsd@node01:~ $
ssh dlp.srv.world hostname

dlp.srv.world
# exit from SSH-Agent

freebsd@node01:~ $
eval $(ssh-agent -k)

Agent pid 1129 killed
Matched Content