1

I'm trying to use ssh-agent in Windows git bash. I do

eval `ssh-agent`

it prints process PID, in task manager I can see that it indeed is running. Then I do ssh-add -l. It thinks for some time and says: Error connecting to agent: Connection timed out. I checked that environment variable SSH_AUTH_SOCK in current terminal is set to something, I checked that only one ssh-agent is running.

My firewall shows me that ssh-add connects to localhost (port number is different every time) but no bytes are sent or received. Surely I tried turning firewall off with no success.

My googling skills are failing me, all errors I could find were related to incorrect running of ssh-agent (i.e. without eval). I'm out of ides.

The question is: how do I make it work?

UPD: I booted in safe mode with networking and ssh-add works. So it must be something in my system setup.

3
  • @KamilMaciorowski I guess you are right; I did the edit.
    – Amomum
    Jan 24, 2018 at 8:40
  • I’m voting to close this question because the issue occurred several years ago and OP notes they do not know the reason the problem went away. Jan 28, 2021 at 4:22
  • @music2myear no objections from OP :)
    – Amomum
    Jan 28, 2021 at 20:26

1 Answer 1

0

You did add a key that was registered on your server, right?

ssh-add ~/.ssh/keyname

then ssh-add -l will actually show something and you can ssh in:

ssh [email protected]
1
  • It was quite a while ago, so I can't really tell now, sorry. But since it started working in safe mode I assume that the key was correct.
    – Amomum
    Jan 28, 2021 at 0:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .