systemctl status sshd

发现启动错误,执行
sshd -t #一般会有错误信息出来然后根据具体错误信息去改配置
重启
systemctl restart sshd #一定要重启
systemctl status sshd #再次检查
本文介绍了一种解决SSH服务启动失败的方法,通过使用'systemctl status sshd'命令检查服务状态,若发现问题,利用'sshd -t'命令找出配置错误,并进行相应的修正。修正后,务必重启SSH服务,确保修改生效。
systemctl status sshd

发现启动错误,执行
sshd -t #一般会有错误信息出来然后根据具体错误信息去改配置
重启
systemctl restart sshd #一定要重启
systemctl status sshd #再次检查
3471
1062

被折叠的 条评论
为什么被折叠?