I have used the machines unique identifier UUID before, it should work on windows and linux. If I am storing it for later I would hash it, if you are using something like @david.wylie suggested, I would also hash it, but use a significantly shorter number of digits.
Something like the problem solved here:
You might even combine all three ideas (a dropdown, a login, and a unique identifier generated on installation / uplink script run-time) and create a system where no login is required, but if you created one you could ‘save’ your machine ID and be able to give it a nickname, and when storing more than one machine id have them available for selection in a user-specific dropdown.
This way users could choose to put in the code every time, or create a login and be able to access many machines though just one client page. The anvil users service is very simple to use, and supports zero password OTP via email only logins and you can configure how often a client would have to log in, etc.