Lutz Jaenicke, on August 31. 2000, wrote:
  : Hi!
  : 
  : I have a "problem" when using ssh-agent with CDE (HP-UX 10.20, if that matters).
  : At dejanews it was simple to find the best place to start ssh-agent under
  : CDE automatically: $HOME/.dtprofile:
  : ...
  : eval `/usr/local/openssh/bin/ssh-agent -s`
  : ...
  : 
  : Unfortunately, I didn't find a way to automatically "ssh-agent -k" (kill) the
  : ssh-agent when logging out, so that ssh-agents are left sitting around
  : (with a parent process id of 1).
  : 
  : Any ideas?

ssh-agent stores its PID to SSH2_AGENT_PID (in the case of ssh2) or
SSH_AGENT_PID (ssh1) environment variable. You could find a way to
either to directly kill it directly with that (kill $SSH2_AGENT_PID)
or, if the variable isn't there anymore when you're logging out, store
it to a file during login (echo "$SSH2_AGENT_PID" >
$HOME/.ssh-agent2.pid) and kill it with that (kill `cat
$HOME/.ssh-agent2.pid`; rm $HOME/.ssh-agent2.pid).

HTH,
-- 
[[EMAIL PROTECTED]          --  Sami J. Lehtinen  --           [EMAIL PROTECTED]]
[work:+358 9 85657425][gsm:+358 50 5170 258][http://www.iki.fi/~sjl]
[SSH Communications Security Corp               http://www.ssh.com/]

Reply via email to