I disagree, a whale can swallow it whole....... and then regurgitate it back whole.How can you eat an apple but keep it intact ?
You can not.
As you mention "losing" access, it implies you still have it. If so, you should be able reset the machine to default configuration using a command rather than by power cycling it and pressing the reset button, which means you could prepare in advance a configuration script with the required configuration allowing remote access and use the /system/reset-configuration command with the run-after-reset parameter to run the script at the first boot after the configuration reset (look also at the keep-users and no-defaults parameters). But there are some surprises (you have to delay execution of the script for some time as e.g. it can be spawned before all the network interfaces have been detected and initialized), so it is very useful to debug it first using some locally accessible Mikrotik device, like e.g. a CHR running on any virtualisation platform you have at hand. You will have just one attempt in the real case.How can I reset RouterOS to factory defaults without losing remote access (Winbox/SSH)?
I would think a whale eating an apple is really close to shore and will most likely end up being groundedI disagree, a whale can swallow it whole....... and then regurgitate it back whole.How can you eat an apple but keep it intact ?
You can not.
First of all, why do you need to do this ??
Workaround:
Insert a script and choose Run After Reset.
Can you explain what your real goal is?How can I reset RouterOS to factory defaults without losing remote access (Winbox/SSH)?
How can you eat an apple but keep it intact ?
You can not.
/system reset-configuration keep-users=yes no-defaults=yes skip-backup=yes run-after-reset=<rsc-file uploaded to Files-directory>
Can you explain what your real goal is?How can I reset RouterOS to factory defaults without losing remote access (Winbox/SSH)?
He probably demanded an immediate answer... and he just go away...
However, by not explaining the reason, he doesn't get the right hint.