Ubuntu 25.04
Sponsored Link

OpenSSH : Use SSH-Agent2025/04/21

 

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

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

Agent pid 1610
# add Identity

ubuntu@node01:~$
ssh-add

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

ubuntu@node01:~$
ssh-add -l

256 SHA256:saW0mmPf1r0HjphkQ1+VGsCK1zqr4U7VUXKuV57pSkY ubuntu@dlp.srv.world (ED25519)
# try to connect with SSH without passphrase

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

dlp.srv.world
# exit from SSH-Agent

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

Agent pid 1610 killed
Matched Content