View previous topic :: View next topic |
Author |
Message |
grant123 Veteran

Joined: 23 Mar 2005 Posts: 1011
|
Posted: Tue Jul 21, 2015 3:30 pm Post subject: Why is ssh-agent running? |
|
|
How can I figure out why ssh-agent is running on my system? |
|
Back to top |
|
 |
DanneStrat n00b


Joined: 05 Jan 2012 Posts: 73
|
Posted: Wed Jul 22, 2015 1:40 pm Post subject: |
|
|
Is gnome-keyring running on your system?
Code: | env | grep SSH_AUTH_SOCK |
would show "SSH_AUTH_SOCK=/run/user/<UID>/keyring/ssh"
if the ssh-agent belongs to gnome-keyring.
Some more info here.
If started somewhere else it would probably use the default "SSH_AUTH_SOCK=/tmp/ssh-xxxxxxxxxxx/agent.<PPID>"
and in that case we can investigate further what started ssh-agent. |
|
Back to top |
|
 |
grant123 Veteran

Joined: 23 Mar 2005 Posts: 1011
|
Posted: Wed Jul 22, 2015 2:08 pm Post subject: |
|
|
I have this:
Code: | # env | grep SSH_AUTH_SOCK
# ps -ef | grep ssh-agent
... /usr/bin/ssh-agent -s |
|
|
Back to top |
|
 |
DanneStrat n00b


Joined: 05 Jan 2012 Posts: 73
|
Posted: Sun Aug 02, 2015 9:58 am Post subject: |
|
|
Hi Grant. Sorry for not replying sooner,
If you use a display manager (DM) like GDM, KDM, LightDM etc. to load a
graphical environment then check the configuration directory for
your DM to see if ssh-agent is started from there.
Using GDM as an example:
Quote: | cat /etc/gdm/Xsession
...
# add ssh-agent if found
sshagent="`gdmwhich ssh-agent`"
if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
command="$sshagent -- $command"
elif [ -z "$sshagent" ] ; then
echo "$0: ssh-agent not found!"
fi
|
My guess would be that other DMs do something similar. |
|
Back to top |
|
 |
|