Here are two utilities you should run one after the other.
The first evaluates for the private key you already used to authenticate into the server.
The second loads this key to the memory.
This way you could login anytime and anywhere in the current session, if the public key has been added to .ssh/authorized_keys*
:
eval $(ssh-agent)
ssh-add
How it works:
ssh-agent is the authentication agent itself, whereas ssh-add is used to add your private keys to this agent.
You execute ssh-agent as an evaluation for your private key and then use the ssh-add command to actually add your private keys to this agent, for prolonged usage.
expect