Mellanox switch factory reset Procedure
If your forget the admin password or you want to reset the configurations, then you can factory reset the switch.
To factory reset, press and hold the RST button for 15 seconds using a paper clip or some sharp object. The LED’s will flicker and the switch will reboot. Now the switch will be reset to factory default settings.