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


Click here to return to the 'iTerm - A Terminal app with tabbed windows' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
iTerm - A Terminal app with tabbed windows
Authored by: AndyF on Apr 22, '03 01:03:24PM

I have set up, in my ~/.MacOSX/environment.plist file, which is available to OSX programs (including iTerm)

<key>SSH_AUTH_SOCK</key>
<string>/Users/andy/.ssh/agent</string>

I have a shell script that I run to set up ssh-agent that looks like

#!/bin/sh
ps xc | grep -q ssh-agent && exit
new=/Users/andy/.ssh/agent
ssh-agent -s > ~/.ssh/env.save 2>/dev/null
. ~/.ssh/env.save
rm -f $new
ln -s $SSH_AUTH_SOCK $new
ssh-add

The script starts ssh agent, and make a symbolic link from the variable-named ssh-agent socket to the fixed name used in my environment.plist file.

Actually, I have more than that. I have also set

<key>SSH_ASKPASS</key>
<string>/Users/andy/Applications/SSHPassKey.app/Contents/MacOS/SSHPassKey</string>

so that SSHPassKey asks for the password. I believe this also requires having set

<key>DISPLAY</key>
<string>localhost</string>

(Perhaps those two variables are better set in the shell script...)

Finally, I made a simple apple script of the form 'do shell script "/Users/andy/bin/start.sh"' that is saved as a an application and run as a login item. Thus ssh is set up (once) when I first log in.



[ Reply to This | # ]