Debian 13 trixie

OpenSSH : Use SSH-Agent2025/08/11

 

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]

It's necessarry to set key-pair with Passphrase first.

[2] This is how to use SSH-Agent.
# start SSH-Agent

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

Agent pid 1452
# add Identity

debian@node01:~$
ssh-add

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

debian@node01:~$
ssh-add -l

256 SHA256:DgSUdzX8e5T2xKy6YV9juS610Z8YtltX2Hw6XFJcgUQ debian@dlp.srv.world (ED25519)
# try to connect with SSH without passphrase

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

dlp.srv.world
# exit from SSH-Agent

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

Agent pid 1452 killed
Matched Content