If a router's login banner is long and has lots of blanks in
it, libcisco's regular expression for a Catalyst switch's
user-mode prompt can sometimes match a portion of the
login banner. When that happens, libcisco immediately
tries to send the "terminal length 0" command to the
router without even bothering to wait for the login
prompt. If the libcisco session was opened with the -log
option, this will look like this in the session log:
******************************************
* Welcome *
* Unauthorized access prohibited. Go away. *
******************************************
User name: terminal length 0
Password:
The problems seems to be that the regular expression
for a Catalyst switch's user-mode prompt matches just
about everything that ends with a blank. If a router's
login banner is very long, the expect pattern matcher
may kick in halfway into the login banner, so it may
happen to see a blank as the last received character if
the login banner contains lots of blanks.
As people around here seem to prefer asterisks to draw
frames around their login banners, slightly changing the
regular expression so it would not match a line beginning
with an asterisk appears to solve the problem at this
particular site. Obviously, your mileage may vary,
though.
init.tcl