My method has been tested on synology nas here. Exception caught while starting SSH server; port already in use (solved)
Someone else confirmed it was also working as expected.
Agree it may get overwritten at a later date, but it shouldn’t be too much of an issue to modify again.