Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I stop ssh-agent from starting when logging into CentOS via openssh?

There are no references to ssh-agent in my bash startup scripts (.bashrc) or /etc/bashrc.

share|improve this question

It is probably started for your gnome session. To get the parent id of your ssh-agent:

cat /proc/$SSH_AGENT_PID/status | fgrep PPid

Then use the number there to look at what process that is:

more /proc/<PPidNUMBER_FOUND>/status.

On Ubuntu 12.04 you find in the first line Name: gnome-session

You will probably find something under /etc/X11:

grep ssh-agent /etc/X11/*

results in:


try commenting that out en restarting X

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.