查看sshd 状态
[root@haha-main-130 var]# systemctl status sshd -l ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since 三 2022-10-26 10:02:14 EDT; 29s ago Docs: man:sshd(8) man:sshd_config(5) Process: 2089 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255) Main PID: 2089 (code=exited, status=255) 10月 26 10:02:14 haha-main-130 systemd[1]: sshd.service: main process exited, code=exited, status=255/n/a 10月 26 10:02:14 haha-main-130 systemd[1]: Failed to start OpenSSH server daemon. 10月 26 10:02:14 haha-main-130 systemd[1]: Unit sshd.service entered failed state. 10月 26 10:02:14 haha-main-130 systemd[1]: sshd.service failed.
查看具体报错
root@haha-main-130 var]# sshd -t
/etc/ssh/sshd_config line 133: Subsystem 'sftp' already defined
解决方法:注释掉这行
标签:02,10,sshd,haha,130,无法,main,连接 From: https://www.cnblogs.com/libruce/p/17147007.html