Replies: 2 comments
-
As an update to this, I do manage to get the login process to work using the following:
However I get a 'Pattern not detected: 'password' when I run. Verbose logging shows we're getting logged in:
just for whatever reason failing to recognize the prompt? Any ideas? |
Beta Was this translation helpful? Give feedback.
-
Thanks to @ktbyers for commenting on a different thread. Found the solution. Netmiko is expecting the password to be echoed, and when it doesn't see that it fails. I had to issue the password like this:
and that did the trick. |
Beta Was this translation helpful? Give feedback.
-
I am running to a spot of bother trying to execute the equivalent of the following command sequence:
The choke point is when I try to enter the password using net_connect.send_command or net_connect.send_multiline I get an error explaining the "Primary_FortiGate #" not detected in output.
I understand what that means, and I tried using:
I've attempted to use connect.send_multiline with the following - it's probably a hot mess:
output += net_connect.send_multiline(['execute ha manage 0 admin', 'password\n',r'#'])
But I get the following error non the less. I understand Fortinet support is experimental, however I am sure I'm not the first person to do this. I am struggling to find specific examples that match this case. Any guidance would be helpful.
Beta Was this translation helpful? Give feedback.
All reactions