如果我在桌面上,我可以使用命令毫無問題地啟動 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
再次運行連線。你應該可以走了