Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sophos can't pass login disclaimer Netmiko #3563

Open
jhonrobh opened this issue Jan 29, 2025 · 3 comments
Open

Sophos can't pass login disclaimer Netmiko #3563

jhonrobh opened this issue Jan 29, 2025 · 3 comments

Comments

@jhonrobh
Copy link

I am using netmiko to log in into a Sophos device and run some commands, but the Connection handler get stock on the login disclaimer waiting for the confirmation (y/n). Log shows error:

Pattern not detected: 'Main Menu' in output.

It is waiting for a Main menu, but banner is still there, waiting to confirmed, need to send 'y' in to connechandler.

Just running this code

try:
print("Connecting to Sophos XG Firewall...")
SSH = ConnectHandler(**device)

print("done")

except Exception as e:
print(f"error: {e}")

@ktbyers
Copy link
Owner

ktbyers commented Jan 29, 2025

Which version of Netmiko are you using?

@ktbyers ktbyers changed the title Can't pass login disclaimer Netmiko Sophos can't pass login disclaimer Netmiko Jan 29, 2025
Repository owner deleted a comment from jhonrobh Jan 29, 2025
@ktbyers
Copy link
Owner

ktbyers commented Jan 29, 2025

Can you show me what it looks like when you manually SSH to the device? Want to see the entire login disclaimer and menu.

Note, I messed up the GitHub issue history here...as I asked something that was irrelevant and accidentally deleted your earlier response.

@jhonrobh
Copy link
Author

This the banner after log in wit user and password

Unauthorized access or violations of security regulations is unlawful and hence if monitoring reveals either, appropriate disciplinary action will be taken against the persons violating security regulations or making unauthorized use of this system.

    Are you sure you want to Continue (y/n):

Wait for confirmation and this is when connect handler got stock because is waiting for the menu

Main Menu

1.  Network  Configuration
2.  System   Configuration
3.  Route    Configuration
4.  Device Console
5.  Device Management
6.  VPN Management
7.  Shutdown/Reboot Device
0.  Exit

Select Menu Number [0-7]:

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

No branches or pull requests

2 participants