Preferences > Remote Control
Settings for the remote control feature
Remote Control allows JOSM to be controlled from other applications, e.g. from a web browser, by opening a listening TCP port (8111) on localhost where it accepts commands.
From JOSM version r6941 through r15469 it was also listening for HTTPS on port 8112.
Note: Due to security reasons the Remote Control is disabled in the default settings and has to be enabled manually.
For JOSM version r6941 through r15469, if you access a website via HTTPS and use the Remote Control it will also use HTTPS to control your JOSM. If it does not work, note that your browser, security addons/plugins and firewalls may block this access (you may be able to whitelist/allow it inside these tools) – check your logs. In addition you may need to tell your browser to accept the self-signed JOSM HTTPS certificate. More details on some of these issues: How do I enable the "remote control" in JOSM? (on the OSM help site).
After JOSM r15469, websites cannot use HTTPS to control JOSM. Safari is the only major browser known to have issues with remote control commands on HTTPS websites.
See the list of Remote control commands.