<返回更多

修改sshd端口时的报错

2023-05-12    玩转Linux与MySQL
加入收藏

编辑/etc/ssh/sshd_config文件,修改sshd端口后,systemctl restart sshd重启sshd报错:

-- Unit sshd.service has begun starting up.

5月 13 00:32:53 localhost.localdomain sshd[2153]: error: Bind to port 11 on 0.0.0.0 failed: Permission denied.

5月 13 00:32:53 localhost.localdomain sshd[2153]: error: Bind to port 11 on :: failed: Permission denied.

5月 13 00:32:53 localhost.localdomain sshd[2153]: fatal: Cannot bind any address.

5月 13 00:32:53 localhost.localdomain systemd[1]: sshd.service: main process exited, code=exited, status=255/n/a

5月 13 00:32:53 localhost.localdomain systemd[1]: Failed to start OpenSSH server daemon.

 

解决方法:这是没有关闭selinux导致的,关闭selinux后正常

[root@localhost ~]# setenforce 0

[root@localhost ~]# systemctl restart sshd

[root@localhost ~]# systemctl status sshd

 

 

声明:本站部分内容来自互联网,如有版权侵犯或其他问题请与我们联系,我们将立即删除或处理。
▍相关推荐
更多资讯 >>>