View previous topic :: View next topic |
Author |
Message |
mgnut57 Apprentice

Joined: 12 Jan 2008 Posts: 247
|
Posted: Tue Oct 22, 2019 2:11 am Post subject: Xfce4 and gnome-keyring-daemon |
|
|
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 |
|
 |
mike155 Advocate

Joined: 17 Sep 2010 Posts: 2564 Location: Frankfurt, Germany
|
Posted: Tue Oct 22, 2019 5:49 pm Post subject: |
|
|
That's difficult to answer. Please tell us why you ask and what you want to do. |
|
Back to top |
|
 |
mgnut57 Apprentice

Joined: 12 Jan 2008 Posts: 247
|
Posted: Tue Oct 22, 2019 8:46 pm Post subject: |
|
|
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 |
|
 |
mike155 Advocate

Joined: 17 Sep 2010 Posts: 2564 Location: Frankfurt, Germany
|
Posted: Tue Oct 22, 2019 11:38 pm Post subject: |
|
|
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 |
|
 |
r7l n00b

Joined: 16 Feb 2019 Posts: 54
|
Posted: Sun Nov 03, 2019 4:10 pm Post subject: |
|
|
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 |
|
 |
|