What type of hardware are you using: VPS bought online
What YunoHost version are you running: YunoHost 12.1.28 (stable)
How are you able to access your server: The webadmin
SSH
Describe your issue
Hello,
I would like to change the SSH port (22) of my YNH server. When I try to do this via the CLI, I get an error, and the same thing happens via the WebGUI. Only the entry ‘22’ seems to be allowed.
CLI command:
sudo yunohost settings set security.ssh.ssh_port -v xxxx
Generates a KeyError.
The same thing happens in the WebGUI.
I can solve the problem by manually opening the new port in the firewall BEFOREHAND. Okay, that makes sense, of course. It seems that the firewall is not updated automatically. Is that intentional or just an oversight?
Many thanks
Share relevant logs or error messages
CLI:
https://paste.yunohost.org/raw/duxuyeruwa
WebGUI:
no log available.
Here are the lines from Install-Window:
“Es ist ein interner Fehler in Yunohost aufgetreten”
“Unerwarteter Serverfehler”
Saving the new configuration…
Konfiguration aktualisiert für ‘ssh’
Konfiguration aktualisiert für ‘fail2ban’
Post-change hook for setting failed : 123
Anwenden der neuen Konfiguration fehlgeschlagen: Ein unerwarteter Fehler ist aufgetreten
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/yunohost/utils/configpanel.py”, line 607, in set
self._apply(self.form, self.config, previous_settings)
File “/usr/lib/python3/dist-packages/yunohost/settings.py”, line 264, in _apply
trigger_post_change_hook(
File “/usr/lib/python3/dist-packages/yunohost/settings.py”, line 291, in trigger_post_change_hook
f(setting_name, old_value, new_value)
File “/usr/lib/python3/dist-packages/yunohost/settings.py”, line 345, in reconfigure_ssh_and_fail2ban
firewall_reload()
File “/usr/lib/python3/dist-packages/yunohost/firewall.py”, line 566, in firewall_reload
if firewall.apply(upnp=not skip_upnp):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/yunohost/firewall.py”, line 184, in apply
if not self.config[“tcp”][ssh_port][“open”]:
KeyError: 123