How to set up ssh keys at login

Begonnen von hightime, 2014/06/07, 17:46:05

Vorheriges Thema - Nächstes Thema

hightime

What is the preferred way to set up ssh keys at login? In the past I've used something like this in either .bashrc or .profile:
keychain --quiet ~/.ssh/id_rsa With siduction this doesn't seem to be working. I also tried to use keychain's eval feature as mentioned in its man page. That didn't work either.

I get the prompt for my passphrase, but no keys are loaded.

Dan



piper

I have a Lucky Rabbit:    "Svoot" ..... (It's Swedish)

I am MAGA

hightime

Thanks, but those are all links to general information on installing and setting up an ssh client. My question is about keychain.

With Redhat, Archlinux and even my old Aptosid box you can add a couple of lines to .bash_profile, as per the keychain man page, to launch keychain at login. It calls ssh-askpass if it's a GUI login to prompt for your passphrase and add your keys to ssh-agent.

I've done some more experimenting and it appears that with lightdm as the login manager .bash_profile is not even being called. Is there some setting that controls this?  If I switch to using kdm it does call .bash_profile, but the keychain - ssh-askpass part is not working.

And to clarify my original post, if I do a console login -- no GUI desktop -- the keychain - ssh-askpass process works correctly.

Is anyone successfully using keychain with siduction linux?

melmarker

#3
only a wild guess - the files you are mention are bash - debian uses dash as sh - in that case the profile would be $HOME/.profile

EDIT: i was wrong with my wild guess - but there is a good explanation here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636108
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)