|
|
|||
![]() |
Code | ![]() | ssh-agent with MacOS X | |
| [ home about me music cv background involvements code community hosting metal log contact webmail ] | ||||
|
The Problem From ssh-agent(1): ssh-agent is a program to hold private keys used for public key authentication (RSA, DSA). The idea is that ssh-agent is started in the beginning of an X-session or a login session, and all other windows or programs are started as clients to the ssh-agent program. Through use of environment variables the agent can be located and automatically used for authentication when logging in to other machines using ssh(1).Unfortunatly, under MacOS X you don't have the opportunity to run your whole session out of the agent. This means that you need to set up two things yourself for it to work. One is the environmental variable that ssh uses to find the socket to talk to ssh-agent through, and the other is taking care of starting and stopping the agent. The Environment ssh-agent(1) uses the environmental variable SSH_AUTH_SOCK to indicate the location of the unix domain socket that it is listening to. Typically, ssh-agent would serve as an umbrella process, subprocesses inheriting this variable. We can set up a global environment variable under MacOS X with the ~/.MacOSX/environment.plist.
I run Apple's X11, so my solution was to attach the agent to my window manager, so it would be run when X11 ran, and would die when I logged out. Here is how I set it up:
There are several solutions to this problem.
All text and images ©2003-2008 Ben H Kram |