Skip to content

Netmiko ReadTimeout due to Login Banner on Cisco ASA Devices #3689

@daniel10059

Description

@daniel10059

Description:
We have numerous Cisco ASA firewalls configured with a login and exec banner displaying:

:::::::::::::::> some banner message <:::::::::::::::

This banner occasionally causes Netmiko to misinterpret the prompt, leading to the following error:

/site-packages/netmiko/base_connection.py", line 748, in read_until_pattern
  raise ReadTimeout(msg)
netmiko.exceptions.ReadTimeout:
Pattern not detected: ':::::::.*' in output.

This issue occurs in approximately 10 out of 200 attempts, all on devices with the same banner.

Reproduction Steps:

con = netmiko.Netmiko(**dev)
response = con.send_command(command)

Expected Behavior:
Netmiko should correctly identify the device prompt and execute the command without timeout errors.

Actual Behavior:
Netmiko raises a ReadTimeout exception, failing to detect the prompt due to the banner.

Suggested Solution:
Please provide a fix in Netmiko so that it correctly handles such banners.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions