From owner-freebsd-questions Mon Jul 10 15:25:25 2000 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 94ED037B992 for ; Mon, 10 Jul 2000 15:25:04 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from strontium.scientia.demon.co.uk ([192.168.91.36] ident=exim) by scientia.demon.co.uk with esmtp (Exim 3.15 #1) id 13BlaM-000MOQ-00; Mon, 10 Jul 2000 22:59:30 +0100 Received: (from ben) by strontium.scientia.demon.co.uk (Exim 3.15 #1) id 13BlaM-0009jc-00; Mon, 10 Jul 2000 22:59:30 +0100 Date: Mon, 10 Jul 2000 22:59:30 +0100 From: Ben Smithurst To: Paul Herman Cc: Mark Ovens , questions@FreeBSD.ORG Subject: Re: Question about the use of ssh-agent(1) Message-ID: <20000710225930.H94380@strontium.scientia.demon.co.uk> References: <20000709195220.C233@parish> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="o71xDhNo7p97+qVi" Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --o71xDhNo7p97+qVi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Paul Herman wrote: > The only problem is, it must only be removed on the *last* logout. Why? I just have a ssh-agent running all the time, it only stops if I explicitly kill it for some weird reason, or I reboot, I've never had any problems with it. The code I use in .zshrc is like this: if source ~/.sshagent.$HOST && ssh-add -l >/dev/null; then # it's running OK : elif [[ $loginname =3D=3D $myname ]]; then # clean up any mess { killall ssh-agent ssh-agent1 rm /tmp/ssh-*/agent.* rmdir /tmp/ssh-* } 2>/dev/null # start the agent and record it's PID and authentication # socket. eval `ssh-agent` echo SSH_AUTH_SOCK=3D$SSH_AUTH_SOCK \ SSH_AGENT_PID=3D$SSH_AGENT_PID > ~/.sshagent.$HOST echo export SSH_AUTH_SOCK SSH_AGENT_PID >> ~/.sshagent.$HOST fi if [[ $loginname =3D=3D $myname ]]; then ssh-add -l | grep -q ben@scientia || ssh-add fi --=20 Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D --o71xDhNo7p97+qVi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use MessageID: 3gIuHaFjDS8u5o28ZldEsux0dPBJyKDd iQCVAwUBOWpHQSsPVtiZOS99AQHuegP/UzWOyNsYRpZQOX7ay/rMCaC4b0Tx902Q NOP8oIYmMVMpDM1gRC50Heent8+9CqNgSf/IGl38sijxawO63gjxcyC1JbEckN+D 4+Xu32JezZcbQ3naV7+t8uJAZYfdH56udcOZazKStCSIOoSsw/OOkDkgUvqDynGY UX+/8OiuzXs= =N953 -----END PGP SIGNATURE----- --o71xDhNo7p97+qVi-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message