[lug] ssh-askpass

Hugh Brown hugh at math.byu.edu
Fri Feb 28 11:32:23 MST 2003


On Fri, 2003-02-28 at 12:51, Hugh Brown wrote:
> For some time now, I have been using ssh-agent to start up my xsession. 
> I then open up a terminal and do an ssh-add.  I haven't had any problems
> with it, but I have some users that don't remember to do it and don't
> want to remember.  they would rather have a little gui pop up and ask
> them for their ssh password right after they log in.
> 
> It seems that ssh-askpass (and/or ssh-askpass-gnome) are the little gui
> tools to use, but I'm not sure what the "right" way is to invoke this on
> gui start up.
> 
> I'd also like to set it up in /etc/skel so that all new users get this
> behavior by default.
> 
> I've gone googling and everything seems to say that ssh-askpass will
> give you an X window interface to ssh-add, but doesn't say what the
> right way is to call it.
> 
> I have discovered that you can pipe stuff to ssh-add (even non-existent
> commands) under rh8 and it will get the dialog box up, I would just like
> to know how to do it the right way and to make it the default for all
> new users created.
> 
> Thanks,
> 
> Hugh
> 

I win the nitwit award.

With RH8.0, redhat has taken care of making sure the agent is set up
properly when you log in, so you have a number of options for doing the
ssh-add/ssh-askpass.

For gnome, you can create a bash script like this

#!/bin/bash
ssh-add ~/.ssh/id_dsa

then go to preferences:///Extras and choose Sessions.  Go to the startup
tab and point at the file you created (and chmod 700'ed) and set it to
start at a priority of 200.

Save your session when you log out.  the next time you log in the gui
dialog is waiting for you.

With KDE, you can put above script in ~/.kde/Autostart/ and it all just
works.

Or, you can do it out of .Xclients by putting it before your exec
gnome-session or exec startkde (you can use switchdesk to generate the
files which you can then modify).  I will play tonight on my home
machine to see how I can get it to work with Afterstep.

All of the above assumes you have openssh-askpass installed and that you
are using the stock RH 8 start up scripts.

hopefully the above is useful

Hugh





> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug




More information about the LUG mailing list