1

I have a private Github repo, and I generated the SSH keys using windows.

I am trying to launch ssh-agent when my windows server starts, I can have the following command..

start "" "%PROGRAMFILES%\Git\bin\sh.exe" --login -i

but the problem with this is...I would need to enter the passphrase for my SSH key everytime i reboot.

I am working with a github repo, where whenever we commit a change then it triggers the GIT PULL on the server (using webhooks).

Anyway I can automate this?

user2404597
  • 488
  • 4
  • 18

1 Answers1

1

You could make sure your .profile (called by sh --login -i) includes a call to ssh-agent with a file:

cat passfile | ssh-add -p keyfile

That way, every time the shell starts, the agent includes your key with its passphrase.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250