I'm wondering what is the best way to manually generate a hardware key based on certain components of the machine.
Here's the thing: I want only certain type of machines to be able to communicate with my server. In order to do that, I'd like to make sure that their hardware is just part of the "allowed hardware" that my server recognizes (or accepts).
I would like to generate a key based on said hardware so I can check it on the server side and make sure that it's among the "allowed ones".
Ideally, it would "check"
- Processor
- Motherboard
- Ethernet network interface
Memory and hard drive are a bit tricky, because those may change pretty often.
I am using Ubuntu 10.10 and I have seen the lshw
command which provides pretty much information about... well... about everything. Also, cat /proc/cpuinfo
, dmidecode
... All of them show a lot of information which I can always parse with regular expressions and do... things, but I was wondering if there's a cleaner more direct way.
Any hint or suggestion in this matter will be appreciated.
Thank you.