You are not logged in.

#1 2010-10-08 15:10:23

supulton
Member
Registered: 2008-12-31
Posts: 58

Slim and ssh keychain

Recently I set up keychain to store my private key passes for a session. After I'd set it up, the next time I restarted, Slim login manager mysteriously stopped working (it would blank out). I changed ttys to discover it was actually in an xsession, so it was waiting for the password to my key (for keychain) since I put:

# ssh agent (keychain)
/usr/bin/keychain -Q -q --nogui ~/.ssh/id_dsa
[[ -f $HOME/.keychain/$HOSTNAME-sh ]] && source $HOME/.keychain/$HOSTNAME-sh

in my ~/.bash_profile.

Is there anyway I can circumvent this behavior to input my key before or after Slim sources my ~/.bash_profile?

Offline

#2 2010-10-10 00:15:49

supulton
Member
Registered: 2008-12-31
Posts: 58

Re: Slim and ssh keychain

Not a lot of slim users use keychain, eh?

Offline

#3 2010-10-10 01:12:50

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Slim and ssh keychain

I use slim and keychain and have no problems with the combination. This is in my .bashrc:

# SSH agent settings
SSHAGENT=/usr/bin/ssh-agent
SSHAGENTARGS="-s"
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
  eval `$SSHAGENT $SSHAGENTARGS`
  trap "kill $SSH_AGENT_PID" 0
fi

I assume you did not set a passphrase on your keys? I call keychain manually after I log in (I have it aliased to cache all my keys though).


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2010-10-10 12:23:04

quigybo
Member
Registered: 2009-01-15
Posts: 223

Re: Slim and ssh keychain

I also just start keychain manually when I need it (aliased of course):

alias keychain_start='eval `keychain --eval --agents ssh id_dsa`'

As an alternative you can use the --noask flag, but then you still need to ssh-add keys when you need them.

@.:B:. You don't need to start ssh-agent if you are using keychain, it will do it for you.

Offline

#5 2010-10-10 13:15:25

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Slim and ssh keychain

I know. However, if keychain starts ssh-agent it won't be picked up by other shells somehow, so this works better for me smile.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#6 2010-10-11 07:35:44

quigybo
Member
Registered: 2009-01-15
Posts: 223

Re: Slim and ssh keychain

@.:B:. That is actually an excellent idea. I am going to steal that. smile

Offline

Board footer

Powered by FluxBB