If you do not want to type your passphrase and your password to use Secure Shell, you can use the agent daemon. If you have different accounts on different hosts, add the keys that you need for the session.
You can start the agent daemon manually when needed, as described in the following procedure.
mySystem$ eval `ssh-agent` Agent pid 9892
mySystem$ pgrep ssh-agent 9892
mySystem$ ssh-add Enter passphrase for /home/username/.ssh/id_rsa: passphrase Identity added: /home/username/.ssh/id_rsa(/home/username/.ssh/id_rsa) mySystem$
mySystem$ ssh myRemoteSys -l username
You are not prompted for a passphrase.
In this example, jdoe adds two keys to the agent daemon. At the end of the session, jdoe removes all the keys from the agent daemon.
mySystem$ ssh-agent
mySystem$ ssh-add
Enter passphrase for /home/jdoe/.ssh/id_rsa: passphrase
Identity added: /home/jdoe/.ssh/id_rsa(/home/jdoe/.ssh/id_rsa)
mySystem$ ssh-add /home/jdoe/.ssh/id_dsa
Enter passphrase for /home/jdoe/.ssh/id_dsa: passphrase
Identity added:
/home/jdoe/.ssh/id_dsa(/home/jdoe/.ssh/id_dsa)
mySystem$ ssh-add -l
SHA256:OX5V4xxoVozwqdZfAbykwawMuwVM+sfc+ThMeai8r9
/home/jdoe/.ssh/id_rsa(RSA)
SHA256:OX5V4xxoVozwqdZfAbykwawMuwVM+sfc+ThMeai8r9
/home/jdoe/.ssh/id_dsa(DSA)
User conducts Secure Shell transactions
mySystem$ ssh-add -D Identity removed: /home/jdoe/.ssh/id_rsa(/home/jdoe/.ssh/id_rsa.pub) /home/jdoe/.ssh/id_dsa(DSA)