Deprecation notice: Paramiko Deprecated for `network_cli`: Migrate to libssh (`ansible-pylibssh`)

Why we are doing this

Paramiko is on a long-term deprecation path in the Ansible ecosystem. Ansible’s direction for SSH connectivity is OpenSSH / libssh, not Paramiko. For network automation (network_cli), the supported path is ansible-pylibssh (libssh), with better alignment to that direction for security, maintenance, and feature development.

What we changed

  • Paramiko support has been consolidated into ansible.netcommon (instead of carrying the same assumptions in ansible-core), and Paramiko has been marked deprecated in ansible.netcommon v8.5.0 and will be removed in a release after 2028-02-01.Users will see a deprecation warning during playbook execution if they are still using Paramiko as their SSH transport.
  • network_cli has standardized on libssh via ansible-pylibssh, including areas like file copy workflows that depend on the SSH transport.
  • Related defaults and behavior in ansible.netcommon have been updated so libssh is the practical default for new deployments.

What you should do now

  1. Prefer libssh for network_cli: Install ansible-pylibssh and configure your playbooks / inventory / ansible.netcommon settings to use ssh_type: libssh (see the documentation for your Ansible major version and installed collection versions).
  2. If you still rely on Paramiko: Paramiko support in network_cli will be removed any time after 2028-02-01. Please plan and migrate to libssh at the earliest. Refer to the migration docs.

For questions, use community forum for the products you run, and include:

  • Ansible version
  • ansible.netcommon version
  • ansible-pylibssh version
  • relevant collection versions
  • platform/OS details

For any issues while using ssh_type=libssh, you can open a GitHub issue on the relevant repository:

  • ansible.netcommon (connection plugins, net_put, net_get, cli_command, cli_config)
  • ansible-pylibssh (SSH library itself, connection failures, key exchange, SFTP/SCP)
2 Likes