question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to send the enable password on a Cisco ASA after establishing the SSH session?

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
whitej6commented, Aug 28, 2018

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()

1reaction
dirtflakecommented, Apr 22, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found