You can configure your SSH client to automatically add your key when making an SSH connection.
- Edit or create the SSH configuration file:
nano ~/.ssh/config
- Add the following configuration:
Host * AddKeysToAgent yes IdentityFile ~/.ssh/id_rsa
Again, replace
~/.ssh/id_rsa
with the path to your SSH key if necessary. - Save and close the file.
This will automatically add your SSH key to the agent whenever you initiate an SSH connection.