ValueError: Failed to enter enable mode. Please ensure you pass the 'secret' argument to ConnectHandler.
See original GitHub issueDear Ktbyers,
I have a issue that tell me to pass the secret argument when i wan to telnet to catalyst 2900 series it’s stack switch, but i already pass the secret argument and then, i try to reopen my program and try to connect again and its work.
Error Message
File "C:\Users\User\Python 3.5.3\lib\site-packages\netmiko\cisco_base_connection.py", line 17, in enable
return super(CiscoBaseConnection, self).enable(cmd=cmd, pattern=pattern, re_flags=re_flags)
File "C:\Users\User\Python 3.5.3\lib\site-packages\netmiko\base_connection.py", line 895, in enable
raise ValueError(msg)
ValueError: Failed to enter enable mode. Please ensure you pass the 'secret' argument to ConnectHandler.
Code
# connect to device
net_connect = ConnectHandler(device_type=list.device_type, ip=list.ip, username=list.username,
password=list.password, secret=list.secret)
# enable mode
net_connect.enable()
Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Netmiko - Enter configuration terminal mode - Stack Overflow
There is a configure terminal mode in netmiko , using conn.config_mode() sends configure terminal to the remote device. However, you can use ...
Read more >How to use the netmiko.ssh_exception ... - Snyk
... msg = ( "Failed to enter enable mode. Please ensure you pass " "the 'secret' argument to ConnectHandler." ) raise ValueError(msg) return...
Read more >netmiko.base_connection API documentation - GitHub Pages
Enter enable mode. :param cmd: Device command to enter enable mode. :param pattern: pattern to search for indicating device is waiting for password....
Read more >Python ConnectHandler.enable Examples, netmiko ...
Python ConnectHandler.enable - 30 examples found. ... password=password, secret=enable_secret ) # enter enable mode ssh_connection.enable() # prepend the ...
Read more >Netmiko – SCP IOS upload Error Troubleshooting! - ITalchemy
ValueError : Failed to enter enable mode. Please ensure you pass the 'secret' argument to ConnectHandler.
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
It will work for me… when i give secret=“123”
device = ConnectHandler(device_type=“cisco_ios”, ip=“192.168.10.1”, username=“shabin”, password=“123”, global_delay_factor=2,secret=“123”)
Personally in my code I use the same password for password and secret. If they are the same then try doing this.
I personally do mine like this: