If you configure a login banner to FortiGates, you have to accept it before you 
can login to the device. This pops up after entering the password, and you are 
prompted with:

$banner-message
(Press 'a' to accept):

I successfully tested these small changes to fnlogin (version 3.8, build 3763) 
to automatically accept the login banner. The lines between the hash-marks were 
added to the fnlogin script.

-----------------------

    -re "@\[^\r\n]+\[Pp]assword:"   {
                      # ssh pwd prompt
                      sleep 1
                      send -- "$userpswd\r"
                      exp_continue
                    }
    -re "$p_prompt"         {
                      sleep 1;
                      if {$uprompt_seen == 1} {
                        send -- "$userpswd\r"
                      } else {
                        send -- "$passwd\r"
                      }
                      exp_continue
                    }
    ### accept banner
    "(Press 'a' to accept):" {
                    send "a\r"
                    exp_continue
                    }
    ### accept banner /end
    -- "$prompt"            { break; }
     }
    }
    set in_proc 0
    return 0
}

-----------------------

Regards,

-Aaron
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Reply via email to