Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

.xsession & .xinitrc (to configure ssh-add)

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
yaga
Posts: 26
Joined: 2010-08-04 03:23

.xsession & .xinitrc (to configure ssh-add)

#1 Post by yaga »

Hello,

I am trying to configure ssh-add to start every time i start my x session.

The problem is i do not have either an .xsession or an .xinitrc file in my home directory since i do not use a display manager (by choice my system boots to the prompt, i start Gnome by using startx).

So i'm just a little concerned on what these files should be made up of before i create them from scratch. I would like to try to avoid a situation where x doesn't start (i'm a little new to configuring X stuff).

Any help is greatly appreciated.

jw013
Posts: 161
Joined: 2009-08-18 21:00

Re: .xsession & .xinitrc (to configure ssh-add)

#2 Post by jw013 »

Hi yaga,

I am not a GNOME user myself, but I am pretty sure GNOME has its own way of managing your ssh keys: look into GNOME Keyring or Seahorse. I'm sure there are other GNOME users on the board who could help you more.

Cheers,

yaga
Posts: 26
Joined: 2010-08-04 03:23

Re: .xsession & .xinitrc (to configure ssh-add)

#3 Post by yaga »

Thanks for the response, jw013.

I would rather not have gnome handle my private pass-phrase, as they currently have an open bug which has not been closed going on a year now.

I'm trying to take advantage of the ssh-agent which loads the pass-phrase into protected memory, where it's not available to other applications.

jw013
Posts: 161
Joined: 2009-08-18 21:00

Re: .xsession & .xinitrc (to configure ssh-add)

#4 Post by jw013 »

That's a good reason. I guess a first step is to make sure ssh-agent is running (open a shell and check if $SSH_AGENT_PID and $SSH_AUTH_SOCK are set). If so all you have to do is use GNOME's mechanism for adding start-up programs to run ssh-add inside a terminal.

yaga
Posts: 26
Joined: 2010-08-04 03:23

Re: .xsession & .xinitrc (to configure ssh-add)

#5 Post by yaga »

Thanks again for the response, jw013.


I'm lost the more i look into this. It seems there are two ssh-agents running. One that i installed via the package manager, and one that was installed when i installed gnome-core (it's in the gnome keyring).

If i ask ssh-agent to delete a key, it says it has. But when i query the keys, it says it still has the one i deleted.


http://live.gnome.org/GnomeKeyring/Ssh

Sorry, i'm just a bit confused here.


I really enjoy using gnome, and am familiar with all the software that comes with it.

So i don't want to use another gui, but i *need* to use ssh securely on my netbook/desktop.

jw013
Posts: 161
Joined: 2009-08-18 21:00

Re: .xsession & .xinitrc (to configure ssh-add)

#6 Post by jw013 »

If I understand correctly, the two ssh agents you see, one is the openssh ssh-agent, and the other is the GNOME keyring daemon. From your previous posts it seems you want to avoid using the gnome agent. I am pretty sure that using ssh-add in the command line will use the openssh agent, so you can completely ignore the gnome keyring. ssh-add -l will list current keys. If you want to be extra sure you could always kill the keyring and also remove it from the startup applications.

Can you describe in more detail the behavior you mentioned with keys not being removed? It sounds puzzling but without more details I'm not sure what to make of it. I can try to help with ssh-add but since I have never used the keyring that part is a bit beyond my ken.

Hope that helps.

yaga
Posts: 26
Joined: 2010-08-04 03:23

Re: .xsession & .xinitrc (to configure ssh-add)

#7 Post by yaga »

Thanks for all your input. I'm taking a closer look at everything now (as i have been for the last few hours, lol), and am trying to figure out how to work around gnome's keyring stuff, while also trying to keep Gnome usable after, ha.
jw013 wrote:Can you describe in more detail the behavior you mentioned with keys not being removed? It sounds puzzling but without more details I'm not sure what to make of it. I can try to help with ssh-add but since I have never used the keyring that part is a bit beyond my ken.
https://bugzilla.gnome.org/show_bug.cgi?id=549413

jw013
Posts: 161
Joined: 2009-08-18 21:00

Re: .xsession & .xinitrc (to configure ssh-add)

#8 Post by jw013 »

The first link (about gnome-keyring ssh) gives some ways to turn off the ssh-agent behavior of gnome-keyring. I'm pretty sure if you just disable keyring ssh and use the standard cli ssh-agent it should work as expected. When gnome-keyring is present it seems it modifies the behavior of ssh-add somehow.

Post Reply