Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Xfce4 and gnome-keyring-daemon
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mgnut57
Apprentice
Apprentice


Joined: 12 Jan 2008
Posts: 228

PostPosted: Tue Oct 22, 2019 2:11 am    Post subject: Xfce4 and gnome-keyring-daemon Reply with quote

Is there some way to get my ssh unencrypted private key held (temporarily) by gnome-keyring-daemon (or similar daemon) while in an XFCE session?
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 2127
Location: Frankfurt, Germany

PostPosted: Tue Oct 22, 2019 5:49 pm    Post subject: Reply with quote

That's difficult to answer. Please tell us why you ask and what you want to do.
Back to top
View user's profile Send private message
mgnut57
Apprentice
Apprentice


Joined: 12 Jan 2008
Posts: 228

PostPosted: Tue Oct 22, 2019 8:46 pm    Post subject: Reply with quote

mike155 wrote:
That's difficult to answer. Please tell us why you ask and what you want to do.


On my systems with MATE, when I ssh to another box, a dialog pops up, asking for the passphrase for my private key. After I enter that passphrase, I no longer have to enter it again when I connect to another system using ssh (unless I run "ssh-add -D").
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 2127
Location: Frankfurt, Germany

PostPosted: Tue Oct 22, 2019 11:38 pm    Post subject: Reply with quote

I don't know much about MATE, but it probably just starts either ssh-agent or gpg-agent (or both) when you start it.

Some desktop environments start those agents, some don't. I think that XFCE can start ssh-agent automatically. See: https://wiki.gentoo.org/wiki/SSH#ssh-agent

Since I want ssh-agent and gpg-agent to run independently on the desktop environment I use, I start those agents in my ~/.bash_profile, when I log in.

You could try that, too. Before you do that, you should decide whether you want ssh-agent, gpg-agent or both. Note: gpg-agent can also act as a SSH agent. If you trust gpg-agent, you probably won't need the SSH agent. See: https://wiki.gentoo.org/wiki/GnuPG#Using_a_GPG_agent

Below is a code snippet from ~/.bash_profile of my user 'mike'
Code:
# Start SSH agent

if [ ! -S ~/.ssh/ssh_auth_sock ]
then
    echo "Starting SSH agent..."
 
    eval `ssh-agent -t 6h`
    ln -sf "${SSH_AUTH_SOCK}" ~/.ssh/ssh_auth_sock

    test -n "${EXIT_CMD}" && EXIT_CMD+="; "
    EXIT_CMD+="kill ${SSH_AGENT_PID}"

    ls -la ~/.ssh/ssh_auth_sock "${SSH_AUTH_SOCK}" \
    | while read line; do echo "   $line"; done
fi

export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
export GSM_SKIP_SSH_AGENT_WORKAROUND=1 # Tell GNOME not to override this variable

ssh-add -l > /dev/null || ssh-add

# Start GPG agent

if [ ! -S ~/.gnupg/S.gpg-agent ]
then
    echo "Starting GPG agent..."

    gpg-agent \
        --homedir "${HOME}/.gnupg" \
        --daemon

    test -n "${EXIT_CMD}" && EXIT_CMD+="; "
    EXIT_CMD+="gpgconf --kill gpg-agent"
fi

# Install trap for exit

if test -n "${EXIT_CMD}"
then
    echo "Installing exit trap..."
    echo "   ${EXIT_CMD}"
    trap "${EXIT_CMD}" 0
fi
Back to top
View user's profile Send private message
r7l
n00b
n00b


Joined: 16 Feb 2019
Posts: 48

PostPosted: Sun Nov 03, 2019 4:10 pm    Post subject: Reply with quote

I can only suggest to try this: https://wiki.gentoo.org/wiki/Keychain

I am not sure if it does use gnome-keyring as i am not using it with keyring. But with the right configuration you would only need to enter you ssh key password once and have it stored for a given time or up until next restart.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum