Why isn't my keyring in Ubuntu working?

Tags:

Answer: 1

26 hours ago

I have encrypted my id_rsa with a password. I think Ubuntu has a keyring system which prevents me from inputting password every time I have to use id_rsa, like git push. Sometimes I don't need to type in the password, sometimes I do.

When I execute

$ ssh-add -l
Could not open a connection to your authentication agent.

$ gnome-keyring import ~/.ssh/id_rsa
WARNING: gnome-keyring:: couldn't connect to: /run/user/1000/keyring-wUoO5j/pkcs11: Connection refused
p11-kit: gnome-keyring: module failed to initialize, skipping: An error occurred on the device
gnome-keyring: couldn't find any place to import files

$ echo $SSH_AUTH_SOCK 
/run/user/1000/keyring-wUoO5j/ssh
$ echo $SSH_AGENT_PID
<empty>

In seahorse, the key is listed in openssh keys

Does any body has the same problem? Or how to solve this?

Added by: Mr. Dejon Schumm

Answer: 2

34 hours ago

I recently had a similar issue (I'm using ElementaryOS), where I had to enter my key's password every time I used it in the terminal. It used to ask me for the password via the GUI and kept that in memory for a while, but this somehow stopped working.

I tried many of the suggestions found by Googling this (eg. adjust deamon config via gconf-settings, checked startup applications, add to .bashrc, install keychain, ..) but to no avail.

I did find this article on Cup of Linux which suggested checking the pam.d settings in /etc/pam.d/. Since my configuration was definitely different as in the article, I search for pam_gnome_keyring and commented all occurences in all files of the lines

auth    optional        pam_gnome_keyring.so
session optional        pam_gnome_keyring.so auto_start

After a reboot / relogin, I was finally asked by the GUI again for the password..

grep before changes:

:~$ grep -r pam_gnome_keyring /etc/pam.d/
/etc/pam.d/common-password:password optional    pam_gnome_keyring.so
/etc/pam.d/lightdm-greeter:auth    optional        pam_gnome_keyring.so
/etc/pam.d/lightdm-greeter:session optional        pam_gnome_keyring.so auto_start
/etc/pam.d/lightdm:auth    optional        pam_gnome_keyring.so
/etc/pam.d/lightdm:session optional        pam_gnome_keyring.so auto_start

grep after changes (note the # in the last 4 lines):

:~$ grep -r pam_gnome_keyring /etc/pam.d/
/etc/pam.d/common-password:password optional    pam_gnome_keyring.so
/etc/pam.d/lightdm-greeter:#auth    optional        pam_gnome_keyring.so
/etc/pam.d/lightdm-greeter:#session optional        pam_gnome_keyring.so auto_start
/etc/pam.d/lightdm:#auth    optional        pam_gnome_keyring.so
/etc/pam.d/lightdm:#session optional        pam_gnome_keyring.so auto_start
Added by: Orval Deckow DVM

Answer: 3

23 hours ago

Probably the Gnome services such as gnome-keyring-daemon and gnome-settings-daemon are not running when you are logged in.

AFAIR you can change this: choose settings > settings manager > session and startup > advanced and enable Gnome services

Another way to avoid typing in your password every time, is to use the following commands once after system startup in a terminal

ssh-agent

ssh-add <add path if not standard key>

you will be prompted for your password to your key and the agent will store it until next reboot.

HTH,

s1mmel

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9