Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'SSH and PB the nicer way...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
SSH and PB the nicer way...
Authored by: nullchar on Feb 17, '02 10:25:21PM
Well I don't think I am alone on this one so I will share what I managed to hack up for myself and my ssh-agent. I use ssh agent all the darn time and without it I would be completely lost. I was really at a loss trying to figure out how to have all Mac OS X applications inherit my agent without starting them from a terminal. Especially since this is so easy to setup under OpenBSD.

So anyways today I figured it out. Basically a small shell script which is executed by LoginWindow and all my apps now inherit my agent. Yes Project Builder started from the dock works as well ;)))

Here how todo it.
1) Download this small script I made.
Agent Startup Script

2) Modify your /etc/ttys as root ( or sudo ). The following is what is before and after...
console "/System/Library/CoreServices/loginwindow.app/loginwindow" vt100 on secure window=/System/Library/CoreServices/WindowServer onoption="/usr/libexec/getty std.9600"

to this

console "/System/Library/CoreServices/loginwindow.app/loginwindow -LoginHook /Script_Location" vt100 on secure window=/System/Library/CoreServices/WindowServer onoption="/usr/libexec/getty std.9600"

3) Make the script executable
chmod 755 /Script Location

4) Reboot

5) Startup your terminal to verify if everything went alright by doing setenv | grep -i SSH if you are using tcsh or
set | grep -i SSH in sh/bash.

You should see something along these lines
SSH_AGENT_PID=274
SSH_AUTH_SOCK=/tmp/ssh-xczKJ273/agent.273
6) If you see the above then all you need todo is add your keys into the
agent with ssh-add.

Once that is all done you can launch Project Builder, completely quit Terminal and your agent will still be around and will automatically be
sourced in the way it should be...

For a bit more detailed info and listing of possible problems you can go to
http://www.unixkb.org/MacOSX/


[ Reply to This | # ]
SSH and PB the nicer way...
Authored by: The DJ on Jun 02, '02 07:46:16PM
Better tools are available now. Check this.

[ Reply to This | # ]