# Does Ansible always run .ssh/rc?

**URL:** <https://forum.ansible.com/t/does-ansible-always-run-ssh-rc/43537>\
**Category:** Get Help\
**Tags:** ssh\
**Created:** [June 24, 2025, 5:54pm UTC](https://forum.ansible.com/t/does-ansible-always-run-ssh-rc/43537 "2025-06-24T17:54:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dylan\_Martin3](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dylan_martin3/32/8574_2.png) [@Dylan\_Martin3](https://forum.ansible.com/u/Dylan_Martin3)\
**Post date:** [June 24, 2025, 5:54pm UTC](https://forum.ansible.com/t/does-ansible-always-run-ssh-rc/43537/1 "2025-06-24T17:54:39Z")

</div>

Hi all!

I want to run all my Ansible processes with a lowered process priority, so I cause as little disruption as possible during ansible runs. I’ve figured out how to do this by running `renice -n 10 -p $$` in `.ssh/rc`.

However, I suddenly got worried that maybe .ssh/rc isn’t read for all Ansible modules/commands/interactions. It definitely works for ansible.builtin.command and ansible.builtin.shell because I use those to check, but maybe there’s some optimization that I don’t know about where some commands bypass .ssh/rc?

Thanks! I hope that makes sense!  
-Dylan

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [June 25, 2025, 3:07am UTC](https://forum.ansible.com/t/does-ansible-always-run-ssh-rc/43537/2 "2025-06-25T03:07:33Z")

</div>

Ansible connection plugins like the SSH connection plugin typically respect the native configuration files for the connection type. So any configuration that would affect the `ssh` command, will affect ansible’s ssh connections. Personally, I’ve only ever set anything in `.ssh/config` not `.ssh/rc`, but I would presume Ansible will always use it if `ssh` will always use it.

That being said, there _are_ connection options that can be set in Ansible configs, but those generally are used _in addition to_ the system/user configs. I don’t believe Ansible does anything with nice/renice out of the box, but even if it did, it would run it in addition to yours. Either it would conflict and break things, or whichever runs last wins. I doubt you have anything to worry about in this case, but it’s something to keep in mind when you try anything else like SSH control sockets.
