ssh Authorization not available. Check if polkit service is running
on  It Road.com

解决方案

原因:

/run 、 /run/lock 到 /var/run 、 /var/lock 之间的符号链接被删除,这会导致服务无法正常运行。

使用以下步骤将 /run 和 /run/lock 之间的符号链接恢复到 /var/run 和 /var/lock:

  1. 备份/var/run:
# mv /var/run /var/run.old
# mv /var/lock /var/lock.old
  1. 重新创建符号链接:
# ln -s /run /var/
# ln -s /run/lock /var/
  1. 验证链接是否已创建:
# ls -l /var/run
# ls -l /var/lock

输出应该是:

$ ls -l /var/run
lrwxrwxrwx. 1 root root 6 Jan 11 2016 /var/run -> ../run
$ ls -l /var/lock
lrwxrwxrwx. 1 root root 11 Jan 11 2016 /var/lock -> ../run/lock
  1. 同步更改:
# sync; sync
  1. 重启服务器:
# reboot

问题

在CentOS/RHEL中启动 ssh 服务时出错,并提示有关 polkit 服务的消息。

# service sshd restart
Redirecting to /bin/systemctl restart sshd.service
Authorization not available. Check if polkit service is running or see debug message for more information.

启动 polkit 服务时遇到同样的问题。

# service polkit restart
Redirecting to /bin/systemctl restart polkit.service
Authorization not available. Check if polkit service is running or see debug message for more information.
日期:2020-09-17 00:13:01 来源:oir作者:oir