0

I am trying to run openvpn client from shell script. When Openvpn client is lauched, it asks for username and password:

fkhan@fahads-hp:~$ openvpn3 session-start --config $OPENVPN
Using configuration profile from file: /home/fkhan/Downloads/.client.ovpn
Session path: /net/openvpn/v3/sessions/0e383f0es926es4553s8b29se340119cceae
Auth User name:
Auth Password: 

To connect, one has to enter "Auth User name" and "Auth Password". How do I pass those values through a shell file so I don't have to enter those values manually.

fahadhub
  • 190
  • 1
  • 11

1 Answers1

0

You can do some script automation tasks using expect command. In Ubuntu linux, you can simply install it - sudo apt install expect

Ref: Use Expect in a Bash script to provide a password to an SSH command

ESSPEE
  • 31
  • 1
  • There's no need for `expect` in this use-case. Installing it may generate new possiblities for hackers. Use caution. – shellter Aug 12 '22 at 18:32