Hello everyone,
I’ve recently installed debian 9 gui on my rock pi 4 b model (emmc card), that i’ve upgraded to debian buster.
I’ve change some configuration related to ssh (/etc/ssh/sshd_config), which is something pretty common by people that secure their access.
When I restart ssh (systemctl restart ssh), everything is taken in consideration, however when i reboot the board, the ssh process started never came through the /etc/ssh/sshd_config. I’ve explicitly used another port and set AddressFamily to inet in order to listen on the ip v4.
After the reboot, we can see through netstat that nothing has been set-up (ssh on ip6 with the default port 22):
root@rockpi4-services:~# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 391/systemd-resolve
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN 391/systemd-resolve
tcp6 0 0 :::22 :::* LISTEN 1/init
tcp6 0 0 :::5355 :::* LISTEN 391/systemd-resolve
In fact, if i check the services, they are dead ?! (not started and managed by systemd?!)
root@rockpi4-services:~# 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)
root@rockpi4-services:~# /etc/init.d/ssh status
● 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)
However, when I just type: /usr/sbin/sshd, it correctly start the process with the configuration (ipv4 and another ssh port). I’m unable to explain what’s going on… I’ve also tried to pass the file in /etc/default/ssh:SSHD_OPTS="-f /etc/ssh/sshd_config" but nothing happen.
Could someone help me with what’s going on ?