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

Re: ssh-agent, keychain, xsession bash_profile scripting



On Friday 15 January 2010 14:33:50 T o n g wrote:
> On Fri, 15 Jan 2010 11:31:08 -0600, Boyd Stephen Smith Jr. wrote:
> > I use this for starting the daemons or connecting to existing daemons by
> > setting environment variables in the current shell: eval
> > "$(/usr/bin/keychain --eval --quiet --inherit any-once --stop others --
> > noask --lockwait 0)"
> 
> Do you put it in your .bash_profile?
> How do you do with ~/.keychain/${HOST}-sh?

It's in ~/bin/keychain-start.sh which was created by me, and is sourced in my 
.zshrc.  Before I switched to zsh, it is sourced in my .bashrc.

> > I use this for adding keys to an existing daemon -- it doesn't change
> > the environment at all:
> > SSH_KEYS=('id_dsa')
> > /usr/bin/keychain --inherit any-once --stop others --clear
> > "${SSH_KEYS[@]}"
> 
> This is on the command line when you input ssh key, right?

It's in ~/bin/keychain-load.bash which was created by me, and is run by my 
.zlogin.  Before I switched to zsh, it was run by my .bash_profile.  (My 
.bash_profile sources my .bashrc near the top.)

> With that '--clear', do you need to input ssh key every time?

Yes.

I have the command for keychain loading in separate files because I also use 
them in ~/.kde/env and refer to them from .desktop files in ~/.kde/Autostart
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: