# Why is ssh-agent running?

## grant123

How can I figure out why ssh-agent is running on my system?

----------

## DanneStrat

Is gnome-keyring running on your system?

```
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.

----------

## grant123

I have this:

```
# env | grep SSH_AUTH_SOCK

# ps -ef | grep ssh-agent

... /usr/bin/ssh-agent -s
```

----------

## DanneStrat

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
> ...

 

My guess would be that other DMs do something similar.

----------

