Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why is ssh-agent running?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 980

PostPosted: Tue Jul 21, 2015 3:30 pm    Post subject: Why is ssh-agent running? Reply with quote

How can I figure out why ssh-agent is running on my system?
Back to top
View user's profile Send private message
DanneStrat
n00b
n00b


Joined: 05 Jan 2012
Posts: 73

PostPosted: Wed Jul 22, 2015 1:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 980

PostPosted: Wed Jul 22, 2015 2:08 pm    Post subject: Reply with quote

I have this:

Code:
# env | grep SSH_AUTH_SOCK
# ps -ef | grep ssh-agent
... /usr/bin/ssh-agent -s
Back to top
View user's profile Send private message
DanneStrat
n00b
n00b


Joined: 05 Jan 2012
Posts: 73

PostPosted: Sun Aug 02, 2015 9:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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