2 Replies Latest reply on Oct 28, 2019 10:04 AM by Naveen kotha

    How can i accept cert from blcli command

    Naveen kotha
      Share This:

      I'm authenticate to blade console to run some nsh commands, which is working fine when I run it manually on server . When try to call that script through Jenkins job it is promoting to accept cert

       

      Do you want to accept the following X509 certificate from "service:authsvc.bladelogic:blauth://bladelogic.com:9840"?

       

      How can i accept this as part of script? here is my nsh script

       

      echo "  Authenticating to BladeLogic using BLAdmins role...\n"

        blcli_setoption serviceProfileName "<profile name" 2> /dev/null

        blcli_setoption roleName BLAdmins

        blcred cred -acquire -profile "<profile name>"  -username "<username>" -password "<password>"

        blcli_connect

        • 1. Re: How can i accept cert from blcli command
          Bill Robinson

          first off, you are running the commands out of order.

           

          you need to run blcred to get a blsso token, and this is the part that will prompt you for a cert.

          then you need to run the blcli commands you want.

           

          you can accept the cert by running:

          echo "yes" |  blcred cert -add -host blapp894.example.com:9840 -protocol tls

           

          that will populate the client_keystore.pkcs12.PEM file on the client system.  you only need to do this the very first time you connect to the appserver from the client system.

           

          so:

          echo "yes" |  blcred cert -add -host blapp894.example.com:9840 -protocol tls

          blcred cred -acquire -profile "<profile name>"  -username "<username>" -password "<password>"

          blcli_setoption serviceProfileName "<profile name" 2> /dev/null

          blcli_setoption roleName BLAdmins

          blcli_connect

          • 2. Re: How can i accept cert from blcli command
            Naveen kotha

            Thank you Bill, That Works!!!!