I am having a problem with ssh-agent: when I add my private key to the agent (started with eval "$(ssh-agent -s)", added with ssh-add ~/.ssh/privatekey and checked it was added with ssh-add -l). It works fine for that session, but when I exit and ssh back into the server and starting the agent, I get:
$ ssh-add -l
The agent has no identities.
I used the workaround of adding eval "$(ssh-agent -s) & ssh-add ~/.ssh/privatekey to my .zshrc, it works of course, but there must be another solution? Thanks for any help :)