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.


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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