Use the Key Agent
You can use the key agent, ssh-agent, to manage the private keys that you use for authentication. The agent enables you to store private keys and use these keys to authenticate ssh, scp, and sftp sessions. Because passphrases are required only when you add keys to the agent, using the agent can simplify scripting that relies on ssh. By default, the connection to the agent can be forwarded, which means you can use the stored identities securely anywhere in the network.
Note: Because agent forwarding creates an added security risk, you may want to disallow it. Use ForwardAgent on the client and AllowAgentForwarding on the server.
To launch the agent in your current shell
To launch the agent in a subshell
To add keys to the agent