sshd启动失败,一直重启

sshd出现了周期性连不上的情况,查看日志如下:

/var/log/secure:

sshd[3170]: Server listening on 0.0.0.0 port 22.
sshd[3170]: Received signal 15; terminating.

/var/log/messages:

systemd: sshd.service holdoff time over, scheduling restart.
systemd: Starting OpenSSH server daemon...
systemd: sshd.service start operation timed out. Terminating.
systemd: Failed to start OpenSSH server daemon.
systemd: Unit sshd.service entered failed state.
systemd: sshd.service failed.
systemd: sshd.service holdoff time over, scheduling restart.
systemd: Starting OpenSSH server daemon...
systemd: sshd.service start operation timed out. Terminating.
systemd: Failed to start OpenSSH server daemon.
systemd: Unit sshd.service entered failed state.
systemd: sshd.service failed.
systemd: sshd.service holdoff time over, scheduling restart.
systemd: Starting OpenSSH server daemon...
systemd: sshd.service start operation timed out. Terminating.
systemd: Failed to start OpenSSH server daemon.
systemd: Unit sshd.service entered failed state.
systemd: sshd.service failed.

journalctl -xe:

sshd.service start operation timed out. Terminating.
sshd[8425]: Received signal 15; terminating.
systemd[1]: Failed to start OpenSSH server daemon.
-- Subject: Unit sshd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit sshd.service has failed.
-- 
-- The result is failed.
systemd[1]: Unit sshd.service entered failed state.
systemd[1]: sshd.service failed.
polkitd[457]: Unregistered Authentication Agent for unix-process:8419:67059806 (system bus name :1.2658, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)

以上就是报错信息,完全找不到原因在哪里, sshd -t 也没有任何输出

无奈只能选择重装opendssh

yum remove openssh
yum install openssh openssh-server openssh-clients
service sshd start
(systemctl start sshd)

重装之后就好了,没有再出现进程被杀死的情况

转载于:https://www.cnblogs.com/linyoudubu/p/9510001.html

你可能感兴趣的:(sshd启动失败,一直重启)