packages icon indicating copy to clipboard operation
packages copied to clipboard

openssh: add UCI support

Open mhusaam opened this issue 1 year ago • 17 comments

Update init script to handle UCI and add a default config

Signed-off-by: Mohd Husaam Mehdi [email protected]

mhusaam avatar Mar 26 '24 11:03 mhusaam

The PR should be useful given that vendors of modern routers prefer the OpenSSH.

Currently we already have the /etc/config/dropbear config that has similar keys: https://github.com/openwrt/openwrt/blob/main/package/network/services/dropbear/files/dropbear.init#L165

Maybe we can migrate the dropbear config to the sshd. E.g. first check if the dropbear exists and if not read the sshd. And similarly for the OpenSSH but it will install own config and that will cause a conflict which config to use.

Users may change the ssh server e.g. have the Dropbear and then install the OpenSSH. But old settings won't be used now e.g. Port number. Of course a user should know what he doing but still some people may lost an access.

Anyway, that would be extremely useful to support same options that the dropbear supports currently. Well, maybe not all, like the BannerFile is not critical at all.

Basically since the Dropbear imitates the sshd. It should be possible to just take its init file and just replace PROG and it must work. If something is not compatible we may patch the Dropbear as I did recently for the ssh-keygen.

stokito avatar Apr 19 '24 21:04 stokito