- jeromel's home page
- Posts
- 2020
- 2019
- 2018
- 2017
- 2016
- 2015
- December (1)
- November (1)
- October (2)
- September (1)
- July (2)
- June (1)
- March (3)
- February (1)
- January (1)
- 2014
- 2013
- 2012
- 2011
- 2010
- December (2)
- November (1)
- October (4)
- August (3)
- July (3)
- June (2)
- May (1)
- April (4)
- March (1)
- February (1)
- January (2)
- 2009
- December (3)
- October (1)
- September (1)
- July (1)
- June (1)
- April (1)
- March (4)
- February (6)
- January (1)
- 2008
- My blog
- Post new blog entry
- All blogs
ssh-add / ssh-agent issue
Updated on Tue, 2013-04-30 09:34 by testadmin. Originally created by jeromel on 2012-02-13 12:10.
Problem with ssh-add / ssh-agent under cygwin
So, when I tried to ssh-add, I got the infamous "Could not open a connection to your authentication agent" message. Searching for this problem, I found this promising article suggesting the following:
- start the ssh-agent by doing: exec ssh-agent /usr/bin/bash
- a new shell is created
- from there, do: ssh-add ~/.ssh/id_dsa
OK, great but this DID NOT work under cygwin ssh (broken for the past year or so after some update). This solution may work under other flavor of Linux / Unix.
Solution
The only way I found to get it to work is to:
- In one cygwin windows, use: ssh-agent -d
- This will start the agent in debug mode. Note the information on SSH_AUTH_SOCK.
- Open a second cygwin terminal and, and define SSH_AUTH_SOCK in that second window (setenv or export depending on csh or bash)
- Now start ssh-add
- Works fine now ... don't ask me why it needs -d to work.
I will update this blog if I learn more.
»
- jeromel's blog
- Login or register to post comments