OpenELEC / service.openelec.settings

service.openelec.settings - OpenELEC settings addon
Other
12 stars 35 forks source link

Custom SSH port is overriden on reboots #72

Closed jamesmacwhite closed 8 years ago

jamesmacwhite commented 8 years ago

While this isn't strictly supported in the UI, if you manually modify the /storage/.cache/services/sshd.conf file, you can pass an additional parameter to the SSH_ARGS variable such as -p 52245 which would run the SSH daemon on the non standard port defined. Upon rebooting however, this parameter will have been removed but other parameters such as PasswordAuthentication will remain.

I'm assuming its because the OpenELEC settings addons modifies this file on startup and because it has no port value in the actual OpenELEC settings UI, it just gets wiped out.

Currently I set chattr +i on the sshd.conf file to prevent it being written to, obviously this breaks the settings addons from writing to it.

While a specific user case, it would be nice if the settings addon didn't wipe out such arguments or if the Settings UI had a option to change the port.

stefansaraev commented 8 years ago

OE never supported "custom ssh ports", you should absolutely not touch that file.

jamesmacwhite commented 8 years ago

Would it be "supported" if the SSH port was able to be changed in the OE settings addon?

chewitt commented 8 years ago

I'm closing this ticket due to elapsed time and because using private SSH keys is a better way to provide security to an OE system than changing port numbers (security through obscurity) - we have no plans to allow changing of the port. NB: You can use /storage/.config/autostart.sh to sed appropriate values at boot time - autostart.sh is run early before connman has started. Thanks.