Automatically Add SSH keys to the SSH agent upon Login

You can configure your SSH client to automatically add your key when making an SSH connection.

  1. Edit or create the SSH configuration file:
    nano ~/.ssh/config
    
  2. 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.

  3. Save and close the file.

This will automatically add your SSH key to the agent whenever you initiate an SSH connection.