如果我在我的桌面上,我可以使用命令毫无问题地启动 protonvpn protonvpn-cli c
。
但是,当我通过 SSH 连接远程连接并运行相同的命令时,出现此错误:
Unable to setup reconnect. Please make sure that you have access to internet or that you've previously connected to another server.
我还没有在论坛上搜索过,所以如果能得到任何帮助我都会很感激。
我目前正在运行 Ubuntu 20.04.3 LTS,并使用官方的 ProtonVPN 包(https://protonvpn.com/support/linux-ubuntu-vpn-setup/)
答案1
经过搜索,终于找到了这个修复程序!
为了修复这个问题,我们需要添加一条PolicyKit
规则NetworkManager
。
使用root权限创建一个文件名/etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager.pkla
,内容如下:
Identity=unix-user:<your username>
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=no
ResultActive=yes
替换<your username>
为您的 Linux 用户名。
对于多个用户名:
Identity=unix-user:<username1>;unix-user:<username2>
检查PolicyKit
身份验证代理是否存在:
# ls /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
ls: cannot access '/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1': No such file or directory
如果文件不存在,请通过以下方式安装apt-get install policykit-1-gnome
:
# apt-get install policykit-1-gnome
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
policykit-1-gnome
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 68.2 kB of archives.
After this operation, 508 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 policykit-1-gnome amd64 0.105-7 [68.2 kB]
Fetched 68.2 kB in 0s (752 kB/s)
Selecting previously unselected package policykit-1-gnome.
(Reading database ... 133186 files and directories currently installed.)
Preparing to unpack .../policykit-1-gnome_0.105-7_amd64.deb ...
Unpacking policykit-1-gnome (0.105-7) ...
Setting up policykit-1-gnome (0.105-7) ...
如果policykit-1-gnome
不存在,尝试使用apt-cache
搜索PolicyKit Authentication Agent
来获取正确的包名称:
# apt-cache search PolicyKit Authentication Agent
lxqt-policykit - LXQt authentication agent for PolicyKit
lxpolkit - LXDE PolicyKit authentication agent
mate-polkit - MATE authentication agent for PolicyKit-1
mate-polkit-bin - MATE authentication agent for PolicyKit-1 (executable wrapper script)
mate-polkit-common - MATE authentication agent for PolicyKit-1 (common files)
libpolkit-agent-1-0 - PolicyKit Authentication Agent API
libpolkit-agent-1-dev - PolicyKit Authentication Agent API - development files
policykit-1-gnome - authentication agent for PolicyKit
polkit-kde-agent-1 - KDE dialogs for PolicyKit
ukui-polkit - UKUI authentication agent for PolicyKit-1
然后尝试protonvpn-cli
再次运行 connect。一切就绪