[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh setup: what is the Debian way?



On Sun, Apr 08, 2007 at 10:14:26 -0600, Paul E Condon wrote:
> On Sun, Apr 08, 2007 at 10:09:28AM -0400, Celejar wrote:
> > On Sun, 8 Apr 2007 08:47:03 -0400
> > Roberto C. Sánchez wrote:
> > 
> > > On Sat, Apr 07, 2007 at 08:26:23PM -0600, Paul E Condon wrote:
> > > > Debian automagically starts ssh-agent somewhere along the chain of
> > > > events that bring up X and Gnome.  I don't reboot often, but when I
> > > > do, I forget to run ssh-add.  Where can I place an invocation of
> > > > ssh-add so that it is run once just after login? I think there must be
> > > > a Debianly correct answer. What is it?
> > > > 
> > > Use the keychain package.  You edit your ~/.bash_profile (or something
> > > like that; I forget, but I can look it up later if you want) to add a
> > > few lines.  Whenever you log in, it asks you to enter your ssh and/or
> > > gpg pass phrases.
> > 
> > IIUC, since he's using ssh-agent he doesn't need keychain, just a place
> > to call ssh-add, which can be ~/.bash_profile or wherever.
> > 
> > Celejar
> > 
> 
> You're right in understanding my question, but .bash_profile doesn't
> seem a right answer. .bash_profile begins with a comment that it is
> executed only by login shells, but it seems to be executed every time
> I open another gnome-terminal window. I'd like to be presented with a
> request to enter my pass-phrase only once when I actually log in.
> 
> Suggestions for other places to try?

I would start ssh-add at the beginning of each Gnome session like this: 

http://gentoo-wiki.com/HOWTO_Autostart_Programs#GNOME

(I don't know really know Gnome; the information for KDE on the same
 page is correct, therefore I hope that the one for Gnome is accurate,
 too.)

Also make sure that you have one of the following installed:

gtk-led-askpass
ssh-askpass
ssh-askpass-fullscreen
ssh-askpass-gnome

(You can also install all of them and switch via the alternatives system
 to find the one that you like best.)

ssh-add will then automatically use the ssh-askpass graphical frontend
to let you type your passphrase. After that all applications can use the
ssh keys until you log out again. (I hope I understood correctly what
you want to achieve.)

-- 
Regards,
          Florian



Reply to: