Imported from the Apple Support Forums via the Wayback Machine 🔗
Hi Everyone,
I had previously been using the *SSH Agent* application from http://www.phil.uu.nl/~xges/ssh/ and wanted to get rid of it and use the built-in support for ssh-agent in Leopard.
However, it didn't work. Doing "env | grep SSH" it would show /tmp/501/nl.uu.phil.SSHAgent.socket and ssh'ing from a terminal window would request your passphrase every time. Executing ssh-agent would say "no agent is running." Even deleting the *SSH Agent* app and rebooting, it would still have this phil socket.
The solution is to use terminal, go to your home directory, cd to .MacOSX and look and see if there's an environment.plist file. In there will be some XML to set this persistent string for SSH AUTHSOCK. You need to take that out. If there's other stuff in the file, like a CVSHOME entry, hand-edit the XML to take out the SSH AUTHSOCK entry. (How to do that is beyond the scope of this post.) If the only thing is that entry, just delete the environment.plist file.
Afterwards, reboot, or maybe just log out and log back in, open a terminal window, and you should be able to ssh out and the system will start ssh-agent behind your back and find your . ssh/id_dsa file or whatever.
Imported from the Apple Support Forums via the Wayback Machine 🔗
That was incredibly helpful, thank you! Was a bit of a rude surprise when all of a sudden half of my security utilities stopped working.
0
jmike·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Thanks for the tip.
BTW, while editing the XML file may be out of the scope of this post, another option, +if you have XCode, et al. installed+, is simply to execute "open environment.plist" from the shell, which should open the file in Property List Editor. Ah.... GUI... 🙂
--jmike
0
Jeff Tsai·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Perfect. I had forgotten that I had used SSHAgent previously and was beating my head wondering why a fresh install of 10.5 was giving the pop-up but the archive and install wasn't...
0
chet.luther·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Thanks for the tip, Karl. I couldn't figure out where that environment variable was coming from for the life of me. Still learning something new about OSX every day.
0
vmwotf·
Imported from the Apple Support Forums via the Wayback Machine 🔗
SSHkeychain assigned a static path to the socket for $SSHAUTHSOCK (/tmp/502/..). Looks like Leopard assigns a dynamic path (/tmp/launch-wajGv2/Listeners) where launch-wajGv2 seems to be arbitrary at each login. This is messing up my cron entries where I need to manually assign the variable. Any way to force the path to always be the same?
0
cleeland·
Imported from the Apple Support Forums via the Wayback Machine 🔗
The man page for ssh-agent provides the following documentation:
-a bind_address
Bind the agent to the unix-domain socket bind_address. The
default is /tmp/ssh-XXXXXXXXXX/agent.<ppid>.
The system ssh-agent's startup arguments are in /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist so you could add something like the following to array that defines the ProgramArguments:
Note that since these mods are being done in /System, they could be wiped out by any system update. You could try making a copy of the file and putting the copy in /Library/LaunchAgents; perhaps files in that directory take precedence over files in /System. Certainly, stuff in /Library shouldn't be wiped out by a system update, though.