I would like to suggest a feature, it would be really-really nice to have a
keep-sshkeys
option or similar to /system reset-configration command. The only way to load a configuration without failures (due to differences in “add” and “set”) is this command with run-after-reset option, but unfortunatelly it regenerates ssh keys too which makes it unusable. If it could preserve it’s digital identity, my problem would be solved.
that would mean, that someone could completely reconfigure your router and you would not notice that something has changes and would use compromised router. I guess you do not want that to happen, do you?
baldaszti how would you use this? why do you need to reset something, and keep the users? reset means reset, remove all config. if you want to reconfigure only some part, use IMPORT command to set new values to existing config, without reset.
We’ve bought over 10 devices and I have to send configuration from a central management system via ssh (scp+import). I need to reset config because /export generates “add” command (in /ip address for example) which will obviously fail on /import. There’s no way to generate and send differential commands, our company’s policy demands that the central management must contain exactly the same config as the device’s.
not necessarily. you can edit the RSC file and issue “remove” commands before adding the new addresses. RSC (Import) file is basically a file that contains RouterOS commands. whatever you can do in console, you can do from this file. This way you can issue commands to remove all other config, and apply only what is needed.
As I mentioned I cannot edit the RSC file (nor by manually due to number of devices, nor by script due to company policy). Why is it a big deal to keep keys like user information during reset? Call it “keep-identity” if you like. Please, we cannot use your devices until there’s a method of saving and restoring configuration in a human readable format (containing cli commands) without loosing the router’s identity. I wouldn’t ask if I could find any other solution.
“keep-identity” looks quite universal to me. I’m not talking about routes, wifis and other provided services, but the safe identification of the router itself on management side.
Flashfig is not an option since the routers are not on the same l2 network (in fact they are hundreds of km away), neither use our cms windows. I’ve already integrated routeros to our cms, I can read and upload configuration perfectly, I only need a way to load an unmodified /extract output without failures or loosing the router’s identity.
why can’t you edit the RSC files?
As I’ve told you by hand it would take too much time, and our company policy does not allow scripts (no home-made configuration manipulating script would ever pass on audit, it’s a question of responsibility).
I cannot. We’re administrating a huge amount of devices from different manufacturers, and RouterOS is the only one that fails. And it’s not the management that write the rules, we got them from the auditor.
And I do have another option, ask the kind developer to put a small “if” statement in the code around the “rm .ssh/id” command (come on, we paid for a dozen level 6 licenses with support, shouldn’t it be enough?).
editing by hand will not take a lot of time. not more than configuring one router. just paste needed commands in a text file, that’s it.
Editing 1 configuration and about 20 DOES TAKE considerably more time. Not to mention the possibility of errors (typos or pasting the same management ip for more routers and other problems).
So what about preserving keys if “keep-users=yes” flag used? No new function involved, you don’t even have to alter the documentation… Please, I really need this, and you can bet I’m not the only one who wants to restore full configuration.
I cannot communicate with it, not by L2 (winbox simply does not see it, no response from device to udp/5678), nor L3 (no response to arp requests for 192.168.88.1). Just for the records I use direct cable which worked until the reset was performed. I dumped on the interface, I see only CDP announcements coming from the device, nothing else.