SSH 不再启动

SSH 不再启动

执行 yum 更新后,守护进程 SSHD 不再启动

Jul 18 19:42:50 Updated: glibc-common-2.17-157.el7_3.5.x86_64
Jul 18 19:42:52 Updated: glibc-2.17-157.el7_3.5.x86_64
Jul 18 19:42:53 Updated: glibc-headers-2.17-157.el7_3.5.x86_64
Jul 18 19:42:53 Updated: glibc-devel-2.17-157.el7_3.5.x86_64
Jul 18 19:42:53 Updated: epel-release-7-10.noarch
Jul 18 19:42:56 Updated: phpMyAdmin-4.4.15.10-2.el7.noarch

这是 systemctl status httpd 的结果

[root@goautodial-7 ~]# systemctl status sshd
● sshd.service
   Loaded: not-found (Reason: No such file or directory)
   Active: failed (Result: exit-code) since Sat 2017-07-22 15:51:13 CEST; 20min ago
 Main PID: 2939 (code=exited, status=255)
   CGroup: /system.slice/sshd.service
           ├─1125 sshd: root@pts/8
           ├─2469 -bash
           └─5649 systemctl status sshd

Jul 22 15:49:43 goautodial-7 sshd[2939]: Server listening on 0.0.0.0 port 22.
Jul 22 15:49:43 goautodial-7 sshd[2939]: error: Bind to port 22 on :: failed: Address already in use.
Jul 22 15:51:13 goautodial-7 systemd[1]: sshd.service start operation timed out. Terminating.
Jul 22 15:51:13 goautodial-7 sshd[2939]: Received signal 15; terminating.
Jul 22 15:51:13 goautodial-7 systemd[1]: sshd.service: main process exited, code=exited, status=255/n/a
Jul 22 15:51:13 goautodial-7 systemd[1]: Failed to start OpenSSH server daemon.
Jul 22 15:51:13 goautodial-7 systemd[1]: Unit sshd.service entered failed state.
Jul 22 15:51:13 goautodial-7 systemd[1]: sshd.service failed.
Jul 22 16:07:01 goautodial-7 yum[5029]: Erased: openssh-server-6.6.1p1-35.el7_3.x86_64
Jul 22 16:07:26 goautodial-7 yum[5124]: openssh-server-6.6.1p1-35.el7_3.x86_64: 100

我也尝试删除并重新安装 openssh-server:

  Installing : openssh-server-6.6.1p1-35.el7_3.x86_64                                                                                            1/1
Error unpacking rpm package openssh-server-6.6.1p1-35.el7_3.x86_64
error: unpacking of archive failed on file /usr/sbin/sshd: cpio: rename
  Verifying  : openssh-server-6.6.1p1-35.el7_3.x86_64                                                                                            1/1

Failed:
  openssh-server.x86_64 0:6.6.1p1-35.el7_3

我几乎确信没有其他进程正在使用端口 22

[root@goautodial-7 ~]# ss -p -l -t
State       Recv-Q Send-Q                           Local Address:Port                                            Peer Address:Port
LISTEN      0      50                                           *:mysql                                                      *:*                     users:(("mysqld",pid=930,fd=14))
LISTEN      0      10                                           *:5038                                                       *:*                     users:(("asterisk",pid=1548,fd=6))
LISTEN      0      2                                            *:sieve-filter                                               *:*                     users:(("asterisk",pid=1548,fd=11))
LISTEN      0      100                                  127.0.0.1:smtp                                                       *:*                     users:(("master",pid=978,fd=13))
LISTEN      0      128                                          *:4577                                                       *:*                     users:(("FastAGI_log.pl",pid=2454,fd=3),("FastAGI_log.pl",pid=2453,fd=3),("FastAGI_log.pl",pid=2452,fd=3),("FastAGI_log.pl",pid=2451,fd=3),("FastAGI_log.pl",pid=2450,fd=3),("FastAGI_log.pl",pid=2419,fd=3))
LISTEN      0      20                                   127.0.0.1:borland-dsj                                                *:*                     users:(("goautodiald.pl",pid=2396,fd=3))
LISTEN      0      128                                         :::http                                                      :::*                     users:(("httpd",pid=4261,fd=4),("httpd",pid=824,fd=4),("httpd",pid=821,fd=4),("httpd",pid=819,fd=4),("httpd",pid=818,fd=4),("httpd",pid=817,fd=4),("httpd",pid=473,fd=4))
LISTEN      0      100                                        ::1:smtp                                                      :::*                     users:(("master",pid=978,fd=14))
LISTEN      0      128                                         :::https                                                     :::*                     users:(("httpd",pid=4261,fd=6),("httpd",pid=824,fd=6),("httpd",pid=821,fd=6),("httpd",pid=819,fd=6),("httpd",pid=818,fd=6),("httpd",pid=817,fd=6),("httpd",pid=473,fd=6))

有人可以帮忙吗?

相关内容