OpenSSH not restart on reboot


On my Ubiquiti ER-X, I installed OpenSSH.
(on LuCI openwrt-19.07 branch (git-20.287.57033-3d52019) / OpenWrt 19.07.4 r11208-ce6496d796)

My config seems correct, because sshd -t not returns errors message.
I enabled the service, as: /etc/init.d/sshd enable
The daemon starts correctly… but after the (re)boot, the service is not active. And I cant connect on. :frowning:

Into LuCI, it appears [ Enabled ].
(Dropbear and OpenSSH are not on same ports)

Any idea?!
(thanks by advance)

/etc/init.d/dropbear disable
/etc/init.d/dropbear stop
/etc/init.d/sshd enable
/etc/init.d/sshd start

I known thoses rules. That's what I did.
unfortunately, at reboot, neither dropbear (normal) nor openssh replys! :frowning:

the drama is when, in addition, you redirect http on localhost, to encapsulate it on ssh. Result no more access! :grimacing:
Now, I redefine the listen address on for uhttpd.

sed -i -e "
\$i logger -t sshd \"\$(pgrep -f -a sshd)\"
\$i logger -t sshd \"\$(netstat -l -n -p | grep -e sshd)\"
" /etc/rc.local; reboot

After the system reboots, post the output:

sshd -T; ls -l /etc/rc.d/*sshd*; logread -e sshd

OK, it seems due to the race condition. If I specify the ListenAdress option, the start failed at boot! :frowning:
If not specified, the start is OK!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.