fgimian / paramiko-expect

A Python expect-like extension for the Paramiko SSH library which also supports tailing logs.
MIT License
204 stars 78 forks source link

Changed regular expressions to not require a new line before the match. #10

Closed rskoog closed 7 years ago

rskoog commented 8 years ago

I was having trouble with some hosts that would give a logon prompt on the first line after logging in. I changed the regular expression being used so this wasn't required.

For example this was an issue when trying to connect to Arista switches without a banner or motd that the user hadn't logged onto since the last reboot/upgrade. Example: [skoog@host ~]$ ssh skoog@labarista password: labarista>

fruch commented 7 years ago

@rskoog seems reasnable, but changing this might break users code. I would suggest an option to disable this prefix to the regex.

(also please rebase, if you want to continue the work on this pull request, some of the files changed names a bit, i'm aware it's from 2 years ago :))

fruch commented 7 years ago

close in ada3417a506ce4db23880e47b6d544878d207e73