Issue was found when power cycling Intel NUC with external relay and after that trying to make a SSH connection to the target device. Verify the problem and fix it.
Connection seemed to work if the device had a natural shutdown ie. after shutdown -S reboot command.
Maybe network driver reboot after each power cycle would work.