Subject: | login to device in priviledge mode fails |
login failed to remote host - prompt does not match at /home/ahartmai/perl5/perlbrew/perls/18/lib/site_perl/5.18.1/Net/Appliance/Session/Transport.pm line 78
line 78 reads:
$self->prompt_looks_like('generic')
or die 'login failed to remote host - prompt does not match';
Why does it check for the generic prompt although it matched the 'priviledged' prompt before according to the debug log?
This happened on a Checkpoint Gaia firewall with a user that has /bin/bash as shell with the following phrasebook:
prompt generic
match /> $/
prompt privileged
match /\[Expert@.+\]\# $/
prompt user
match /[Uu]sername: $/
prompt pass
match /[Pp]assword: $/
macro begin_privileged
send exit
match privileged
macro end_privileged
send clish
match generic
macro disconnect
send logout
My current solution is to swap the generic and priviledged prompts as well as the commands sent in begin_ and end_priviledged.