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

Kernels & Hardware, configuring network, installing services

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

Postby yaga » 2011-05-05 04:47

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.
yaga
 
Posts: 26
Joined: 2010-08-04 03:23

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

Postby jw013 » 2011-05-05 22:26

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,
jw013
 
Posts: 161
Joined: 2009-08-18 21:00

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

Postby yaga » 2011-05-06 00:14

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.
yaga
 
Posts: 26
Joined: 2010-08-04 03:23

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

Postby jw013 » 2011-05-06 00:26

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.
jw013
 
Posts: 161
Joined: 2009-08-18 21:00

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

Postby yaga » 2011-05-06 01:18

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.
yaga
 
Posts: 26
Joined: 2010-08-04 03:23

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

Postby jw013 » 2011-05-06 01:57

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.
jw013
 
Posts: 161
Joined: 2009-08-18 21:00

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

Postby yaga » 2011-05-06 03:34

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
yaga
 
Posts: 26
Joined: 2010-08-04 03:23

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

Postby jw013 » 2011-05-06 04:16

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.
jw013
 
Posts: 161
Joined: 2009-08-18 21:00


Return to System configuration

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable