aristanetworks / anta

What do you call an ant with frogs legs?
https://anta.arista.com/
Apache License 2.0
52 stars 26 forks source link

Better error message when using exec collect-show-tech and asyncssh cannot verify host #808

Open gmuloc opened 2 months ago

gmuloc commented 2 months ago
[12:28:48] INFO     Connecting to devices...                                                                                                                                     utils.py:160
[12:28:49] CRITICAL Uncaught Exception when running ANTA CLI                                                                                                                    logger.py:116
                    Please reach out to the maintainer team or open an issue on Github: https://github.com/aristanetworks/anta.
                    HostKeyNotVerifiable: Host key is not trusted for host 192.168.0.15

Basically asyncssh is doing things right and

A list of expected server host keys can also be specified, with AsyncSSH defaulting to looking for matching lines in the user’s .ssh/known_hosts file.

https://asyncssh.readthedocs.io/en/latest/api.html

We should recommend people to add the SSH keys to known_hosts