hzyitc / armbian-onecloud

Armbian for onecloud. 玩客云用armbian
1.25k stars 239 forks source link

虽然登陆速度是恢复了,但是ssh服务好像还是有问题,如下 #40

Closed hkbase closed 1 year ago

hkbase commented 2 years ago

刷入的镜像版本Armbian_22.08.0-trunk_Onecloud_bullseye_edge_5.18.0.burn.img https://github.com/hzyitc/armbian-onecloud/releases/tag/ci-20220824-144151-UTC 我是在登陆ssh之后,输入的下面的命令,22端口的服务变成了由init提供,而正常的openssh是dead的:

# netstat -tpln|grep 22
tcp        0      0 192.168.2.29:53         0.0.0.0:*               LISTEN      3224/dnsmasq        
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      3224/dnsmasq        
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1/init  

# systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:sshd(8)
             man:sshd_config(5)

# systemctl status sshd
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:sshd(8)
             man:sshd_config(5)
hkbase commented 2 years ago

这里再提供一个以前的镜像版本openssh服务正常运行时的状态,作为对比参照

# systemctl status sshd
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-08-19 15:17:14 CST; 5 days ago
       Docs: man:sshd(8)
             man:sshd_config(5)
   Main PID: 852 (sshd)
      Tasks: 1 (limit: 2206)
     Memory: 3.7M
        CPU: 7.803s
     CGroup: /system.slice/ssh.service
             └─852 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

Aug 24 19:35:27 onecloud sshd[16876]: Accepted password for root from 100.82.95.62 port 52218 ssh2
Aug 24 19:35:27 onecloud sshd[16876]: pam_unix(sshd:session): session opened for user root(uid=0) by (uid=0)
Aug 25 12:22:13 onecloud sshd[23008]: Accepted password for root from 100.82.95.62 port 49421 ssh2
Aug 25 12:22:13 onecloud sshd[23008]: pam_unix(sshd:session): session opened for user root(uid=0) by (uid=0)
Aug 25 12:28:31 onecloud sshd[23104]: Accepted password for root from 100.82.95.62 port 50947 ssh2
Aug 25 12:28:31 onecloud sshd[23104]: pam_unix(sshd:session): session opened for user root(uid=0) by (uid=0)
Warning: journal has been rotated since unit was started, output may be incomplete.
gfourdx commented 2 years ago

我刚刷完, 一样的问题

hzyitc commented 2 years ago

systemd 使用 sshd.socket + sshd@.service 对每个链接提供独立的 SSH daemon。暂不清楚为啥默认安装激活的是 sshd.socket

参见ArchWiki: https://wiki.archlinux.org/title/OpenSSH#Daemon_management

isyekong commented 1 year ago

在 23.02.0 遇到相同的故障

hzyitc commented 1 year ago

现在应该没问题了吧。有问题再reopen这个issue吧