Trying to change password of a device without expecting prompt #2449
Replies: 2 comments 1 reply
-
The pattern shown here should probably work: https://github.com/ktbyers/netmiko/blob/develop/EXAMPLES.md#handling-commands-that-prompt-timing If you are using Netmiko4 (currently the develop branch), you could also use send_multiline_timing() |
Beta Was this translation helpful? Give feedback.
-
Tried as suggested, but it is not working as expected. Won't we expect any prompt after login, if yes, then we will see prompt as "(current) UNIX password:" BUG:paramiko.transport:starting thread (client mode): 0xb16c7dc0 |
Beta Was this translation helpful? Give feedback.
-
There is a usecase in my environment, by default device will have some default credentials and on login it will ask to change default credentials. Below is the manual snippet for the same.
Manual steps:
Using username "root".
Keyboard-interactive authentication prompts from server:
End of keyboard-interactive prompts from server
Access denied
Keyboard-interactive authentication prompts from server:
| Password:
| You are required to change your password immediately (root enforced)
| Changing password for root.
| (current) UNIX password:
| Enter new UNIX password:
| Retype new UNIX password:
I am trying to automate above manual steps using netmiko and protocol is ssh. Can anyone give some pointers here ?
Beta Was this translation helpful? Give feedback.
All reactions