Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Sep 2002 10:14:47 -0700 (PDT)
From:      "M.T." <mbsd@pacbell.net>
To:        Volker Kindermann <freebsd@secspace.de>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: how to autostart ssh-add?
Message-ID:  <20020901100848.A69871-100000@atlas.home>
In-Reply-To: <20020901182801.5593f2ef.freebsd@secspace.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 1 Sep 2002, Volker Kindermann wrote:

> Hi,
>
> I'm running FreeBSD stable on my notebook. I use the X-Environment and
> log in graphically with xdm. I connect very often to remote machines
> with ssh, so I decided to use publickey authentication
> and ssh-agent/ssh-add (my private keys are protected with passphrases).
>
> My .xsession looks like:
>
> [vkinderm@argus vkinderm]$ cat .xsession
> exec /usr/bin/ssh-agent /usr/X11R6/bin/fluxbox
>
> After logging in, I start a xterm and run ssh-add to add my keys to the
> agent.
>
> Now I'm looking for a way to have ssh-add automatically started after
> login. OpenBSD does it. I've already copied all of the OpenBSD
> xdm-files to my FreeBSD box but no success.

First install the openssh-askpass port.  Then select a way to fire up
ssh-add during login.  If you can't convince your window manager to do
it for you, you can for example change your .xsession to:

 #!/bin/sh
 eval `/usr/bin/ssh-agent`
 trap '/usr/bin/ssh-agent -k' 0 1 2 3 15
 /usr/bin/ssh-add .ssh/id_rsa &
 /usr/X11R6/bin/fluxbox

  $.02,
  /Mikko


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?20020901100848.A69871-100000>