I'm trying to have the following commands be auto-executed when I login to my server via ssh:
ssh-agent /bin/bash
ssh-add ~/.ssh/id_rsa
My ssh key has a passphrase and I'm fine with entering it once per login.
I tried putting this in my .bashrc file, however I believe that ssh-agent starts a new bash session. When I try to login after having this in my .bashrc, it gets stuck, and I have to type 'exit' to then see the 'enter passphrace to unlock key' prompt
Any other suggestions?
Server is running Ubuntu LTS
git pull
and such on the remote server