Skip to content

fix: allow ssh-rsa algorithm for Cisco network device connections#2355

Merged
IPvSean merged 1 commit intoansible:develfrom
IPvSean:devel
Apr 13, 2026
Merged

fix: allow ssh-rsa algorithm for Cisco network device connections#2355
IPvSean merged 1 commit intoansible:develfrom
IPvSean:devel

Conversation

@IPvSean
Copy link
Copy Markdown
Contributor

@IPvSean IPvSean commented Apr 13, 2026

Summary

  • OpenSSH 8.8+ disables ssh-rsa by default, but Cisco IOS-XE/C8K devices require it for public key authentication
  • Added ansible_libssh_publickey_algorithms=ssh-rsa to the [cisco:vars] section in the student inventory template (instances_network.j2)
  • Added ansible_libssh_publickey_algorithms=ssh-rsa to Cisco router (rtr1) host entries in the instructor inventory template (instructor_inventory_network.j2)
  • Added PubkeyAcceptedAlgorithms +ssh-rsa and HostKeyAlgorithms +ssh-rsa to the SSH config (sshconfig.j2) deployed to control nodes, so direct SSH to routers also works

Error this fixes

fatal: [rtr1]: FAILED! => {"changed": false, "msg": "ssh connection failed: Failed to authenticate public key: The key algorithm 'ssh-rsa' is not allowed to be used by PUBLICKEY_ACCEPTED_TYPES configuration option"}

Test plan

  • Provision a network workshop and verify ansible-navigator run playbook.yml --mode stdout succeeds against Cisco rtr1
  • Verify student can SSH directly to rtr1 from the control node

Made with Cursor

OpenSSH 8.8+ disables ssh-rsa by default, but Cisco IOS-XE devices
require it. Add ansible_libssh_publickey_algorithms=ssh-rsa to the
student and instructor inventory templates for Cisco routers, and
add PubkeyAcceptedAlgorithms/HostKeyAlgorithms to the SSH config
deployed to control nodes.

Made-with: Cursor
@IPvSean IPvSean merged commit a94207c into ansible:devel Apr 13, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant