You want to add a ssh key using
ssh-add. It fails with this message:
Could not open a connection to your authentication agent.
ssh-agent manages the keys added by
ssh-add. Even if there is already an instance running, the current shell instance may not be aware of it –
ssh-agent sets the environment variable
In order to start a new instance of ssh-agent, execute this command:
If yo use this approach on a server (which isn’t rebootet regularly), an enormous amount of running ssh agents is accumulated over time. Therefore you might want to execute
killall ssh-agent from time to time to kill all
sh-agent instances you can’t use any more (because you can’t access the environment variables any more).