-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added MOTD Wake Up #3425
base: develop
Are you sure you want to change the base?
Added MOTD Wake Up #3425
Conversation
This resolves #3424 |
I moved this to a draft, because it warrants a conversation on if this is the best way to resolve the issue or if it should be moved/tweaked |
@FriendlyGecko Which platform does this apply to? Also is this when using a Console or directly via SSH to the device? |
This specifically affects Cisco devices. I will set up another lab and test it again, but as far as I remember I ran into the issue with both console and SSH, and this solved both. Please give me a little time to confirm though. |
UPDATE: Latest update may make this pull request irrelevant. With my current home lab I was unable to replicate the issue that the pull request was intended to solve. I will test again with my previous lab which have a different IOS and see if that is related. If I am unable to replicate it there then I will close the pull request and the associated issue. |
This may not be the best way to solve the issue, but it is a way.
Issue we are trying to solve
When attempting to log into a device that uses a MOTD, the login fails. This is because the MOTD requires the user to first send a return character to wake it up. If I use putty to first console in and press enter, I can swap back to my netmiko script and log into the device without issue.
To solve the issue, I added a check (checks if the login process is already started) that will send a return character to the device to first wake it up before going to into the login process. If the user is already logged in, then all this will do is return a blank line (unless there is text in the prompt somehow).
This may be better, but taking critiques on it: