1

I'm trying to install Open VPN using the official instructions available here:

https://community.openvpn.net/openvp.../OpenVPN3Linux

However, I'm failing at this 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

The terminal prompts:

bash: /etc/apt/sources.list.d/openvpn3.list: Permission denied

What do I do? Thanks!

2 Answers2

1

It should be as follows:

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

The sudo tee part takes care of permissions.

mikewhatever
  • 33,013
0

The Open VPN instructions work if you are logged in as root. i.e. first do

sudo -i

This means you do not need to solve the permission problem line by line. See this answer How to solve "permission denied" when using sudo with redirection in Bash?

Idiot Tom
  • 101