4

I have read docs on GitHub and found that I can start ssh-agent by eval $(ssh-agent -s). But it seems every time I execute this command, I am starting a new process of ssh-agent. How can I check if ssh-agent is already running from git bash in order to avoid start duplicated ssh-agent?

Update:Maybe because of my ignorance, I am not able to find much useful info related to my question in the provided link. I would like to know how to check whether ssh-agent has already been running or not. If yes, then how many? Not how to start ssh-agent or automatically to start it on git bash opening.

7
  • Possible duplicate of Getting ssh-agent to work with git run from windows command shell Commented Dec 10, 2018 at 20:59
  • stackoverflow.com/search?q=%5Bssh-agent%5D+check+running Commented Dec 10, 2018 at 20:59
  • Hi, @phd could you please located relative info for me? I browsed the links you provided but found not much related with my question. I would like to know how to check whether ssh-agent has already been running or not. Not start ssh-agent or automatically start it on git bash opening. Commented Dec 11, 2018 at 17:16
  • What are you gonna do if it's not started yet? Commented Dec 11, 2018 at 17:59
  • 1
    This script uses ps -f -u $USERNAME | grep ssh-agent for the same task. Commented Dec 11, 2018 at 18:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.