Start ssh-agent and load a key for a limited time
how to add ssh key to ssh-agent | ssh-add key with timeout | enter ssh passphrase only once | ssh-agent | ssh-add | ssh-keyseval "$(ssh-agent -s)" && ssh-add -t 4h ~/.ssh/id_ed25519_serverStarts an SSH agent for the current shell and loads the key after you enter the passphrase once. With -t the key is removed automatically after the given time. ssh-add -l shows the loaded keys, ssh-add -D removes all of them.
Note: On desktops an agent is usually already running, in which case the ssh-add part is enough.
Also searched as
- how to add ssh key to ssh-agent
- ssh-add key with timeout
- enter ssh passphrase only once