-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openssh: add UCI support #23752
base: master
Are you sure you want to change the base?
openssh: add UCI support #23752
Conversation
The PR should be useful given that vendors of modern routers prefer the OpenSSH. Currently we already have the 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 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. |
Hello, thank you for reviewing this PR. I am sorry for the delayed response. I have updated the PR as follows:
Kindly review. |
dab0bb0
to
02f526c
Compare
Oh, sorry, I didn't noticed that the One thing that I see here that if in a future we'll add the The LUCI doesn't show an option for the |
I grepped the For bool options must be used |
I checked and the Dropbear also has some options that weren't migrated:
This is not critical at all, the PR can be merged and we can back to thos later. |
I updated https://openwrt.org/docs/guide-user/base-system/dropbear with more detailed description of the |
02f526c
to
1032511
Compare
Hello,
|
I have added support for the option keyfile in init script. As you said, maybe we can come back to this later. |
1032511
to
c3ea745
Compare
Hello, Sorry for the delayed response and if there seems to be many changes in the script. As the number of options increased, I felt that I could optimize the script. The following updates have been done in the latest patch:
Kindly review. |
For other packages that you have mentioned, yes maybe this could be added. But I don't have enough availability right now to raise more PRs. :( |
When installing the sshd it will copy options from dropbear and remove (!) the dropbear config. But the dropbear will remain started and the port 22 will be busy. I think that on migration we should copy options from the dropbear but disable the sshd e.g. Also it looks like we need a protection from double migration after OpenWrt firmware upgade: The least but not least. What if a user just manualy configured the We may need to add an option |
c3ea745
to
14c5518
Compare
Hello, Sorry for the delayed response. We need to consider mirgation on upgrade too. If we disable sshd, and someone upgrades with an image which has sshd (openssh), then sshd will get disabled and there will be no ssh possible to the device. I have added support for option IncludeConfigFile. Kindly review. |
14c5518
to
81e1d37
Compare
|
76ad1e8
to
2d57eb2
Compare
* update init script to handle sshd UCI by generating config file and passing that config file to the sshd daemon * add a default sshd config * add uci-default script that tries to migrate dropbear config and authorized_keys file to sshd Signed-off-by: Mohd Husaam Mehdi <husaam.mehdi@iopsys.eu>
2d57eb2
to
58e1d7a
Compare
Updated, kindly review. |
Update init script to handle UCI and add a default config
Signed-off-by: Mohd Husaam Mehdi husaam.mehdi@iopsys.eu