Page 1 of 1

Automatize the cert creation

Posted: Sun Jun 14, 2020 8:36 pm
by daol
Hello

I am experimenting with ubuntu and try to learn how the things work in IT word. Just started so I don't know a lot.

I installed my VPN server based on this article https://www.digitalocean.com/community/ ... untu-18-04

I wrote a bash for the VPN creation but when I try to run it I need to SSH to the other server at some point. If I start the script from SSH i got an error message:
./easyrsa: 341: set: Illegal option -o echo

My bash contain this and run from my VPN server:
sshpass -p $PASSWORD ssh username@"CA server IP" "/home/username/makevpn.sh $NAME $PASSWORD"

And makevpn.sh contain this:
./easyrsa sign-req client $NAME

If I run the bash from my CA server everything is working fine. Else if I run it with SSH it will generate that error.
I tried to read after this error and found nothing. :( Hope someone can help because I am hopeless after 2 days of troubleshooting.