problems installing openvpn client [closed]
Asked Answered
T

2

21

following the instructions on the official vpn page (instructions install openvpn client) in the second step:

# curl -fsSL https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/openvpn-repo-pkg-keyring.gpg

I get the following error message:

sudo curl -fsSL https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/openvpn-repo-pkg-keyring.gpg
-bash: /etc/apt/trusted.gpg.d/openvpn-repo-pkg-keyring.gpg: Permission denied
(23) Failed writing body
Telfer answered 24/10, 2021 at 7:2 Comment(3)
Not really a programming problem so a bit "off" for this site, but the commands on that page seem to be designed to run at a root prompt, not using sudo.Odontoblast
@JoachimIsaksson, you are right. Have a nice sunday!!Telfer
@JoachimIsaksson your comment should be the answer!Monoplane
T
41

I had a similar issue recently. Use

sudo wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub

and

sudo apt-key add openvpn-repo-pkg-key.pub

Reference - https://openvpn.net/cloud-docs/openvpn-3-client-for-linux/

Tang answered 26/10, 2021 at 16:54 Comment(7)
Hello Danny, <br/> I would like to execute client linux openvpn: <br> openvpn --config ~/.ssh/vpnbook-us1-tcp443.ovpn<br/> Is it right?<br/> I have found a file of type openvpn from book: <br/> link<br/> Do I have to create my own file?<br/> <br/> I have seen the content of this type of file: <br/> dev tun1<br/> proto tcp<br/> remote 198.7.62.204 443<br/> remote us1.vpnbook.com 443<br/> resolv-retry infinite<br/> <br/> How do I start the openvpn client in linux (ubuntu)? I already have everything installed<br/> <br/> Thanks in advanceTelfer
sorry I do not know how I could put new lines in comments. Sorry!Telfer
Login to the VPN server page. There you have to download client.ovpn (User Lock Profile/Auto Login Profile) file from server. To connect the VPN, use the command, openvpn3 session-start --config path/to/client.ovpnTang
It isn't clear to me that these two commands above replace "curl -fsSL swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/openvpn-repo-pkg-keyring.gpg" but this so far seems to work. I haven't tried using the OpenVPN Client yet, though, so take that with a grain of salt.Assiduous
I'm seeing this message - Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).Albuminate
Unable to locate package openvpn3 - even after doing this. Anyone know how else to get openvpn3 on Ubuntu 20.04? Having the same issues as OP.Barbell
@Albuminate and others using apt-key is outdated and insecure. Run the openvpn install commands via root, not sudo.Vinita
A
2

The tutorial you posted is still valid, but as it was pointed out in the comments, you have to run the commands as superuser (I just tested sudo but it wouldn't work either).

Moreover, apt-key is mostly deprecated, so be careful with the accepted solution. If you follow the steps there, you will get a deprecation warning every time you run apt update.

Arciniega answered 15/11, 2022 at 17:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.