Here is something that works, well it works here, see at the bottom.
| I've been trying to figure out how to get ssh-agent to auto-startup w/ CDE on
| Solaris.
|
| I got things working pretty well by changing .dtprofile to have
| "DTSOURCEPROFILE=true", and then adding to .login:
|
| if ( ${?DT} ) then
| eval `/usr/local/bin/ssh-agent`
| else
|
|
|
| This gets things working 95% of the way .... The problem that I still have, is
| that when I exit out of CDE, the agent is still running, and I don't see an
| automatic way of killing it.
|
| Is anyone doing this? My goal is to have ssh-agent work for any terminal that
| I open under CDE. Right now, I manually do a 'ssh-agent xterm' and then run
| stuff from there, which is really annoying.
|
Let's make this easy for everyone, so lets go step by step:
1- su root
2- cd /usr/dt/bin
3- mv Xsession XsessionA
Here is the new Xsession startup:
#!/bin/ksh
#
# This script starts ssh-agent if there is a defined "$HOME/.ssh/identity
# file.
#
if [ -f $HOME/.ssh/identity -a -x /usr/local/bin/ssh-agent ] ; then
/usr/local/bin/ssh-agent /usr/dt/bin/XsessionA
else
/usr/dt/bin/XsessionA
fi
Now when ssh-agent starts, it's for the entire session, this
is what we want.
One last thing, add the following script
in /etc/dt/config/Xsession.d/0010.LOCAL.ssh
#!/bin/ksh
#
if [ x$SSH_AUTHENTICATION_FD != x -o x$SSH_AUTHENTICATION_SOCKET != x \
-a -x /usr/local/bin/ssh-add ]
then
/usr/local/bin/ssh-add
fi
Don't forget to put all files "755"!
This was working fine under Solaris 2.5.1 and as far as I recall,
it should work well under Solaris 2.6 and 7...
Pierre B.