How to send the enable password on a Cisco ASA after establishing the SSH session?
See original GitHub issueI have the following code in python.
device = form.cleaned_data['device'] username = form.cleaned_data['username'] password = form.cleaned_data['password'] dev = netmiko.ConnectHandler(device_type='cisco_asa', ip=device, username=username, password=password) if dev: enablepass = form.cleaned_data['enablepass'] dev.exit_enable_mode() print(dev.find_prompt()) dev.secret = enablepass dev = netmiko.redispatch(dev, device_type = 'cisco_asa') dev.enable() print(dev.find_prompt())
However i am unable to get the device to enter in to the enable mode… What am I missing?
The idea is to have 2-factor which is used for both login and enable.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
ASA Version 9.x SSH and Telnet on the Inside and Outside ...
Complete these steps in order to configure SSH access to the security appliance: SSH sessions always require a form of authentication such as...
Read more >Configure SSH on Routers and Switches - Cisco
This document describes how to configure and debug Secure Shell (SSH) on Cisco routers or switches that run Cisco IOS® Software.
Read more >Cisco ASA Series General Operations CLI Configuration ...
You can no longer connect to the ASA using SSH with the pix or asa username and the login password. To use SSH,...
Read more >CLI Book 1: Cisco ASA Series General Operations CLI ...
You can no longer connect to the ASA using SSH with the pix or asa username and the login password. To use SSH,...
Read more >SSH console towards ASA doesn't prompt for username ...
When setting up the session this is observed: - SSH terminal - after entering the IP only the black screen appears w/o prompt...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try it with passing in the secret kwarg, that is how that is meant to function. Then you can also issue sshdevice.enable() this will handle it all for you.
sshdevice = netmiko.ConnectHandler(ip=device, device_type=device_type, username=username, password=password,secret=secret) sshdevice.enable()
@ktbyers I am so happy that you have replied to my comment. I just started learning python and really loving Netmiko, I appreciate your effort to help the Network community.