Re: cygwin ssh-add problem
From: Alan Hadsell (ahadsell@MtDiablo.com)Date: 04/16/02
- Next message: eho: "Re: cygwin ssh-add problem"
- Previous message: eho: "cygwin ssh-add problem"
- In reply to: eho: "cygwin ssh-add problem"
- Next in thread: eho: "Re: cygwin ssh-add problem"
- Reply: eho: "Re: cygwin ssh-add problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Alan Hadsell <ahadsell@MtDiablo.com> Date: Tue, 16 Apr 2002 03:36:02 GMT
eho <ericmho@shaw.ca> writes:
> I'm running the latest cygwin and openssh (1.3) and I have problem to
> get the ssh-add going. It always gives me:
>
> Could not open a connection to your authentication agent.
>
> I'm wondering anyone has successfully implemented ssh-agent and ssh-add
> under cygwin? Thanks
Sure, it works fine here.
The problem is probably that you haven't arranged for the proper
environment variables to be available for ssh-add, so that it can
locate the agent.
If you just start ssh-agent from bash, you'll see something like this:
,----
| $ ssh-agent
| SSH_AUTH_SOCK=/tmp/ssh-eGmI1492/agent.1492; export SSH_AUTH_SOCK;
| SSH_AGENT_PID=1456; export SSH_AGENT_PID;
| echo Agent pid 1456;
`----
This is meant to be information that goes into your environment, where
it will be available to ssh-add (and to the ssh client). The simple
way to arrange this is to say instead:
,----
| $ eval `ssh-agent`
| Agent pid 1784
`----
What this does is cause the environment settings to be passed back to
bash, where they are stored in environment variables:
,----
| $ env | grep SSH
| SSH_AGENT_PID=1784
| SSH_AUTH_SOCK=/tmp/ssh-vcRr1820/agent.1820
`----
This will allow ssh-add (and the ssh client) to work correctly, as
long as it is invoked from the same bash shell that started
ssh-agent.
This doesn't work if you want to use ssh from applications started
from the desktop. I have an insecure hack that I use in those cases,
which I can post if you're interested.
-- Alan Hadsell If brute force doesn't work, you aren't using enough.
- Next message: eho: "Re: cygwin ssh-add problem"
- Previous message: eho: "cygwin ssh-add problem"
- In reply to: eho: "cygwin ssh-add problem"
- Next in thread: eho: "Re: cygwin ssh-add problem"
- Reply: eho: "Re: cygwin ssh-add problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|