FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 11-28-2010, 09:51 PM
Ron Loftin
 
Default ssh-agent fails to hold values

On Sun, 2010-11-28 at 17:16 -0500, bluethundr wrote:
> That DID it!!! thanks and I agree.. god? root? what's the difference!!

Actually, there IS a difference.

God doesn't have to log in. ;^>

>
> On Sun, Nov 28, 2010 at 4:41 PM, Ron Loftin <reloftin@twcny.rr.com> wrote:
> >
> > On Sun, 2010-11-28 at 16:35 -0500, bluethundr wrote:
> >> Hello list
> >>
> >> I am attempting to manage my key logins with ssh-agent. However EVERY
> >> time I try to ssh I have to go through the same exact routing and it's
> >> getting a little old...
> >>
> >> [bluethundr@LCENT01:~]#ssh sum3
> >> Enter passphrase for key '/home/bluethundr/.ssh/id_rsa':
> >>
> >> [bluethundr@LCENT01:~]#exec ssh-agent bash
> >> [bluethundr@LCENT01:~]#ssh-add
> >> Enter passphrase for /home/bluethundr/.ssh/id_rsa:
> >> Identity added: /home/bluethundr/.ssh/id_rsa (/home/bluethundr/.ssh/id_rsa)
> >> [bluethundr@LCENT01:~]#ssh sum3
> >> Last login: Sun Nov 28 14:32:34 2010 from localhost.localdomain
> >> ################################################## #######
> >> # SUMMITNJHOME.COM #
> >> # TITLE: LCENT03 BOX #
> >> # LOCATION: SUMMIT BASEMENT #
> >> # #
> >> ################################################## #######
> >> [bluethundr@LCENT03:~]#
> >>
> >>
> >> Does anyone have any suggestions to make ssh-agent hold these values a
> >> bit more persistently?
> >
> > I'm not sure if this will help, but I use the "keychain" package from
> > RPMForge, and it takes most of the pain out of dealing with SSH keys.
> >
> >>
> >> thanks!!
> >>
> >>
> >>
> > --
> > Ron Loftin reloftin@twcny.rr.com
> >
> > "God, root, what is difference ?" Piter from UserFriendly
> >
> > _______________________________________________
> > CentOS mailing list
> > CentOS@centos.org
> > http://lists.centos.org/mailman/listinfo/centos
> >
>
>
>
--
Ron Loftin reloftin@twcny.rr.com

"God, root, what is difference ?" Piter from UserFriendly

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2010, 10:41 AM
John Doe
 
Default ssh-agent fails to hold values

From: bluethundr <bluethundr@gmail.com>

> I am attempting to manage my key logins with ssh-agent. However EVERY
> time I try to ssh I have to go through the same exact routing and it's
> getting a little old...
> Does anyone have any suggestions to make ssh-agent hold these values a
> bit more persistently?

I have this in my .bash_profile:

AGENTRUNNING=`ps x | grep agent | grep -v grep`
if [ -z "$AGENTRUNNING" ]; then
/usr/bin/ssh-agent -s > $HOME/.ssh/agent-env.sh
fi
. $HOME/.ssh/agent-env.sh > /dev/null

Then, I ssh-add once and that's it.

JD



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2010, 11:43 AM
Nico Kadel-Garcia
 
Default ssh-agent fails to hold values

On Mon, Nov 29, 2010 at 6:41 AM, John Doe <jdmls@yahoo.com> wrote:
> From: bluethundr <bluethundr@gmail.com>
>
>> I am attempting to manage my key logins with ssh-agent. *However EVERY
>> time I try to ssh I have to go through the same exact routing *and it's
>> getting a little old...
>> Does *anyone have any suggestions to make ssh-agent hold these values a
>> bit more *persistently?
>
> I have this in my .bash_profile:
>
> *AGENTRUNNING=`ps x | grep agent | grep -v grep`
> *if [ -z "$AGENTRUNNING" ]; then
> * */usr/bin/ssh-agent -s > $HOME/.ssh/agent-env.sh
> *fi
> *. $HOME/.ssh/agent-env.sh > /dev/null
>
> Then, I ssh-add once and that's it.

And if you log in on another machine with that same home directory on
NFS, you'll load information for the wrong host's ssh-agent keys.

Install and use "keychain". It's leaps and bounds more reliable than this.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-30-2010, 09:19 AM
John Doe
 
Default ssh-agent fails to hold values

From: Nico Kadel-Garcia <nkadel@gmail.com>

> On Mon, Nov 29, 2010 at 6:41 AM, John Doe <jdmls@yahoo.com> wrote:
> > From: bluethundr <bluethundr@gmail.com>
> >> I am attempting to manage my key logins with ssh-agent. However EVERY
> >> time I try to ssh I have to go through the same exact routing and it's
> >> getting a little old...
> >> Does anyone have any suggestions to make ssh-agent hold these values a
> >> bit more persistently?
> > I have this in my .bash_profile:
> > AGENTRUNNING=`ps x | grep agent | grep -v grep`
> > if [ -z "$AGENTRUNNING" ]; then
> > /usr/bin/ssh-agent -s > $HOME/.ssh/agent-env.sh
> > fi
> > . $HOME/.ssh/agent-env.sh > /dev/null
> > Then, I ssh-add once and that's it.
> And if you log in on another machine with that same home directory on
> NFS, you'll load information for the wrong host's ssh-agent keys.
> Install and use "keychain". It's leaps and bounds more reliable than this.

No NFS home directories... so no problems.
What reliability problems are you refering to?
So far, it just worked fine...

JD



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-30-2010, 11:58 AM
Nico Kadel-Garcia
 
Default ssh-agent fails to hold values

On Tue, Nov 30, 2010 at 5:19 AM, John Doe <jdmls@yahoo.com> wrote:
> From: Nico Kadel-Garcia <nkadel@gmail.com>
>
>> On Mon, Nov 29, 2010 at 6:41 AM, John Doe <jdmls@yahoo.com> wrote:
>> > From: *bluethundr <bluethundr@gmail.com>
>> >> *I am attempting to manage my key logins with ssh-agent. *However *EVERY
>> >> time I try to ssh I have to go through the same exact routing * and it's
>> >> getting a little old...
>> >> Does *anyone have any *suggestions to make ssh-agent hold these values a
>> >> bit more * persistently?
>> > I have this in my .bash_profile:
>> > * AGENTRUNNING=`ps x | grep agent | grep -v grep`
>> > *if [ -z *"$AGENTRUNNING" ]; then
>> > * */usr/bin/ssh-agent -s > *$HOME/.ssh/agent-env.sh
>> > *fi
>> > *. $HOME/.ssh/agent-env.sh > */dev/null
>> > Then, I ssh-add once and that's it.
>> And if you *log in on another machine with that same home directory on
>> NFS, you'll load *information for the wrong host's ssh-agent keys.
>> Install and use *"keychain". It's leaps and bounds more reliable than *this.
>
> No NFS home directories... so no problems.
> What reliability problems are you refering to?
> So far, it just worked fine...

The NFS home directory is the big one. Another other is that, if
something sets "AGENTRUNNING", in another script and you inherit it,
it's not reset. And since it's in a .bashrc, once it's set, you'll
inherit for other scripts: if it dies, you won't get a new one due to
the inherited AGENTRUNNING. And what if the user has "agent" in their
login name?

If it works in your small environment, fine, but I wouldn't publish it
for general use without more thought. The "keychain" perl script is
actually pretty good.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-30-2010, 12:30 PM
John Doe
 
Default ssh-agent fails to hold values

From: Nico Kadel-Garcia <nkadel@gmail.com>

> If it works in your small environment, fine, but I wouldn't publish it
> for general use without more thought. The "keychain" perl script is
> actually pretty good.

I am not going to pit 5 lines of shell against a 1500+ lines perl script...
It was just a suggestion, not an official publication... ;P

JD



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 07:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org