Date: Mon, 10 Jul 2000 22:59:30 +0100 From: Ben Smithurst <ben@FreeBSD.org> To: Paul Herman <pherman@frenchfries.net> Cc: Mark Ovens <mark@dogma.freebsd-uk.eu.org>, questions@FreeBSD.ORG Subject: Re: Question about the use of ssh-agent(1) Message-ID: <20000710225930.H94380@strontium.scientia.demon.co.uk> In-Reply-To: <Pine.BSF.4.21.0007092134220.2764-100000@bagabeedaboo.security.at12.de> References: <20000709195220.C233@parish> <Pine.BSF.4.21.0007092134220.2764-100000@bagabeedaboo.security.at12.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000710225930.H94380>
