ssh-agent, keychain, and Vista [Was: Re: Vista + cygwin basics]
Charles Wilson
cygwin@cwilson.fastmail.fm
Wed Apr 23 05:41:00 GMT 2008
Karl M wrote:
>> Karl M wrote:
>>> Just a comment...keychain is pretty heavy for what you get in
>>> Cygwin.
>>> My solution was to launch ssh-agent as a service (one for each
>>> user that wants it). That service spawns the agent and updates
>>> the user environment in the registry so that other processes can
>>> find the ssh-agent process/socket. The advantages are that it is
>>> fast and the agent survives a logout (only rekey for a reboot is
>>> desired).
>>
> It is three bash script files and one C program (just compile it with
> gcc). The shell scripts (1) install the service, (2) are the service
> under cygrunsrv and (3) is the commands to add to your bash_profile.
> If you use a different shell, they will need syntax tweaking. The C
> program provides access to sending a Windows API call to broadcast a
> message for WM_SETTINGCHANGE. This is needed because the user can log
> in before the service is started in XP. I think that this all worked
> on WIN2k when last I tried it, but it has been a long time since I
> touched a WIN2k box. I have no experience with Vista :.).
I'll give that a try. Here's my attempt, using session ids. There's a
simple C program to obtain the session id, a patch to apply to
/usr/bin/keychain to use it, and the snippet that goes into ~/.bash_profile.
It seems to do what I want, but as you say, keychain does slow down the
login process quite a bit. Other drawbacks to my approach:
(1) the console user's ssh-agent does not survive logoff (but remote
logons' ssh-agents do, since they all live in session 0).
(2) non-standard, win32-specific patch to /usr/bin/keychain
--
Chuck
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: wts_session.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20080423/28ad94b4/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: keychain.diff
URL: <http://cygwin.com/pipermail/cygwin/attachments/20080423/28ad94b4/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bash_profile.snip
URL: <http://cygwin.com/pipermail/cygwin/attachments/20080423/28ad94b4/attachment-0001.ksh>
-------------- next part --------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list