总结 不要用centos了,经常出问题,梅开五度

我丢,同一台机器不到一个月就梅开二度了。


不小心储存爆了,遂重启。重启后ssh连不上没反应。
通过vnc进去用systemctl systemctl status sshd看见报错Failed to start Openssh server daemon


sshd -t 报错job for sshd.service failed because the control process exited with error code

本来都想着备份一下,重装系统算了,但是一看备份工作量也不小,就尝试重装一下openssh,居然成了。


通过rpm命令查看openssh的安装情况

rpm -qa openssh*

卸载所有和openssh相关的东西:

yum remove openssh*

重新安装openssh:

yum -y install openssl openssh-server openssh*

最后再按需修改配置文件就行了:

vim /etc/ssh/sshd_config

启动服务并设置开机自启:

systemctl start sshd
systemctl status sshd

看见绿色以后再设置开机自启动。

1450736751.png

systemctl enable sshd
Last modification:April 12, 2023
V50%看看实力