How can I automate inputting text into a prompt?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
-2
down vote

favorite












new Linux user here. I was trying to automate the launch of OpenVPN, by placing this code into a .sh file and then launching it.



openvpn --config vpnbook-us1-tcp443.ovpn


After executing this command, I am brought to a text prompt where I am supposed to input the username (vpnbook) and then the password. Is there a command that will allow me to automatically input these two sections of text so that I don't have to type them in every time? Thanks.







share|improve this question

























    up vote
    -2
    down vote

    favorite












    new Linux user here. I was trying to automate the launch of OpenVPN, by placing this code into a .sh file and then launching it.



    openvpn --config vpnbook-us1-tcp443.ovpn


    After executing this command, I am brought to a text prompt where I am supposed to input the username (vpnbook) and then the password. Is there a command that will allow me to automatically input these two sections of text so that I don't have to type them in every time? Thanks.







    share|improve this question





















      up vote
      -2
      down vote

      favorite









      up vote
      -2
      down vote

      favorite











      new Linux user here. I was trying to automate the launch of OpenVPN, by placing this code into a .sh file and then launching it.



      openvpn --config vpnbook-us1-tcp443.ovpn


      After executing this command, I am brought to a text prompt where I am supposed to input the username (vpnbook) and then the password. Is there a command that will allow me to automatically input these two sections of text so that I don't have to type them in every time? Thanks.







      share|improve this question











      new Linux user here. I was trying to automate the launch of OpenVPN, by placing this code into a .sh file and then launching it.



      openvpn --config vpnbook-us1-tcp443.ovpn


      After executing this command, I am brought to a text prompt where I am supposed to input the username (vpnbook) and then the password. Is there a command that will allow me to automatically input these two sections of text so that I don't have to type them in every time? Thanks.









      share|improve this question










      share|improve this question




      share|improve this question









      asked 2 days ago









      Korish

      31




      31




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          Create a file to hold your auth details, with the first line being that username and the second being your password.



          You can then modify your .ovpn file, adding a line:
          auth-user-pass THATFILE



          That should automatically handle those details for you.






          share|improve this answer





















          • Thanks a lot, got it to work!
            – Korish
            2 days ago










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460559%2fhow-can-i-automate-inputting-text-into-a-prompt%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          Create a file to hold your auth details, with the first line being that username and the second being your password.



          You can then modify your .ovpn file, adding a line:
          auth-user-pass THATFILE



          That should automatically handle those details for you.






          share|improve this answer





















          • Thanks a lot, got it to work!
            – Korish
            2 days ago














          up vote
          3
          down vote



          accepted










          Create a file to hold your auth details, with the first line being that username and the second being your password.



          You can then modify your .ovpn file, adding a line:
          auth-user-pass THATFILE



          That should automatically handle those details for you.






          share|improve this answer





















          • Thanks a lot, got it to work!
            – Korish
            2 days ago












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          Create a file to hold your auth details, with the first line being that username and the second being your password.



          You can then modify your .ovpn file, adding a line:
          auth-user-pass THATFILE



          That should automatically handle those details for you.






          share|improve this answer













          Create a file to hold your auth details, with the first line being that username and the second being your password.



          You can then modify your .ovpn file, adding a line:
          auth-user-pass THATFILE



          That should automatically handle those details for you.







          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered 2 days ago









          Pat Gunn

          1212




          1212











          • Thanks a lot, got it to work!
            – Korish
            2 days ago
















          • Thanks a lot, got it to work!
            – Korish
            2 days ago















          Thanks a lot, got it to work!
          – Korish
          2 days ago




          Thanks a lot, got it to work!
          – Korish
          2 days ago












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460559%2fhow-can-i-automate-inputting-text-into-a-prompt%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay