# Make an SSH connection and run a command from within the playbook

**URL:** <https://forum.ansible.com/t/make-an-ssh-connection-and-run-a-command-from-within-the-playbook/36256>\
**Category:** Ansible Developer\
**Created:** [January 27, 2022, 6:23pm UTC](https://forum.ansible.com/t/make-an-ssh-connection-and-run-a-command-from-within-the-playbook/36256 "2022-01-27T18:23:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Daniel\_Bianco](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@Daniel\_Bianco](https://forum.ansible.com/u/Daniel_Bianco)\
**Post date:** [January 27, 2022, 8:23pm UTC](https://forum.ansible.com/t/make-an-ssh-connection-and-run-a-command-from-within-the-playbook/36256/3 "2022-01-27T20:23:25Z")

</div>

Brian, thanks for the info.

As you mention, I found the netcommon collection ([https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/index.html](https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/index.html))

I understand the idea, but I don’t understand how to use the connection plugin. ([https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/libssh\_connection.html#ansible-collections-ansible-netcommon-libssh-connection](https://docs.ansible.com/ansible/latest/collections/ansible/netcommon/libssh_connection.html#ansible-collections-ansible-netcommon-libssh-connection))

Do you have any example?

Thanks

---

_[View the full topic](https://forum.ansible.com/t/make-an-ssh-connection-and-run-a-command-from-within-the-playbook/36256)._
