Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

Keychain



Do you run your script from the bash prompt or do you insert it in your
.bash_profile? I guess my question is, is there any reason I can't run it from my
.bash_profile? That way I can kill the running agent with ssh-agent -k in my
.bash_logout. I guess if I think this thru then I have to prevent subsequent shells
from being login. The better way would be to save the script in bin as startssh or
something and then call it once from the command line. As for the logout I will have
to test using "ps" to see if there is another running bash shell so that the first
shell to be closed does not kill the running instance of ssh-agent for the remaining
shells. Cygwin is not a secure environement so I would prefer shutting off ssh when I
logout.

till next
    Jim Kelly-Rand

John Abreau wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Content-Type: text/plain; charset=us-ascii
>
> jbk <jbk at mail2.gis.net> writes:
>
> > No, this keychain is an open source shell script available from Gentoo that
> > utilizes ssh-agent in such a manner that it is possible to start mutiple shells
> > with out multiple instances of ssh-agent being generated each time.
>
> If you use the "eval `ssh-agent`" syntax, you get that behavior. What
> I do on my home machine is
>
>     ssh-agent | head -2 > ~/.ssh/agent-id
>     source ~/.ssh/agent-id
>     ssh-add
>
> and my .bashrc contains
>
>     [ -e ~/.ssh/agent-id ] && source ~/.ssh/agent-id
>
> I just have to start an ssh-agent once after rebooting the machine,
> then I just leave it running for weeks or months at a time. Every
> instance of bash I start up after that uses the one ssh-agent instance.
>
> I haven't actually tried this on Windows, but given how well cygwin
> works in general, I would expect this to work correctly as well.
>
> Note that the "head -2" is to eliminate the "echo" command that
> ssh-agent prints after the two "export" commands, because running that
> "echo" command from within the .bashrc causes scp and sftp to fail.
>
> - --
> John Abreau / Executive Director, Boston Linux & Unix
> Email jabr at blu.org / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
> PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
> Comment: Exmh version 2.5 07/13/2001
>
> iQCVAwUBPeg2g1V9A5rVx7XZAQL5NgP+M+YCKYvFAuft+MMUq4jdcV+xVaTIZMhS
> wNbCqcF4Iuk2H8E+wCE5e/fbVEaOzNyB9A7mOhNhDkYztXJrawvxil7Ki+ri1VDn
> OcLGyS6W/SH3734QdQHHXtGeC/x6ThXQU5vlOwWDqqgKxo7idfIV3/pVY4BPdhjj
> SPhBU6nQfZ8=
> =W3A1
> -----END PGP SIGNATURE-----





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org