Machine Token Utility
Utility for Generating Licensed Login Tokens
The below link contain the latest binaries that can be used to generate Login Tokens
Sample Output
$ ./HexaEight-Machine-Tokens-Utility --help
This Tool present in (/home/releaseuser/ ) Generates Machine Login Tokens
-------------------------------------------------------------------------
HexaEight-Generate-Login-Tokens-For-Resources 1.0.1
Copyright (C) 2024 HexaEight-Generate-Login-Tokens-For-Resources
-n, --newtoken Generates new Machine Token using a License Code
-r, --renewtoken Renews Existing Machine Token using a License Code
-c, --cpucores List total number of CPU cores in your machine
-v, --verifyenvironment Checks if there are any issues in your Machine/Environment that is preventing generation of License
--help Display this help screen.
--version Display version information.
- The first step is to run the Machine Token Utility using the --cpucores to determine the total number of cores in the Machine you plan to use the Login Token. Remember that if you have 1 Core, you need a Single Core License and if you machine has 8 Cores, you need a 8 Core License. In the below output you can see the total number of CPU is 1 but it has 4 Cores, so 1 x 4 = 4 Core License is required for this machine.
$ ./HexaEight-Machine-Tokens-Utility.exe --cpucores
Machine Token License Information
---------------------------------
CPU Count : 1 Total Cores : 4
-
Once the total number of cores is determined you can purchase the License from our website. If you have a different number of cores not listed in the pricing page, please contact HexaEight Supporrt who will assist you to complete the purchase.
-
Before generating your Login Token for a specific machine, it's necessary to ascertain whether the machine resource will be made accessible via a public identifier such as a domain name.
- If you don't possess a domain name, you can acquire one for free at Dynamic DNS. This is suitable for testing purposes, although it can technically be used for production as well. If you require professional assistance in setting up a domain name, our experts are readily available to guide you through the process.
- It's important to note that you can also generate a Login Token without a domain name by using the Generic Resource. However, using a domain name provides a means to verify the authenticity of the machine, confirming that it is indeed owned by the domain owner (which is you). This also helps end users, to ascertain that they are engaging with a Domain Site owner especially when obtaining Captcha Tokens (One-Time-access-codes) for your application.
Generate your Resource Token
-
Use HexaEight Authenticator Mobile App to generate your Domain Resource or Generic Resource based on the above decision. Refer to the Mobile App Section for the steps to generate a new Domain Resource or Generic Resource
-
Run the Machine Token Utility to generate your Login Code, keep HexaEight Authenticator Mobile App ready by logging into your EMail Vault. While the below example shows Windows, you can run the Machine Token utility to generate the token on Linux, Mac or even Raspberry pi devices.
$ ./HexaEight-Machine-Tokens-Utility.exe --newtoken
This Tool present in (/home/releaseuser/ ) Generates Machine Login Tokens
-------------------------------------------------------------------------
Enter Resource Name : auth.hexaeight.dns-dynamic.net
Enter New Password For Your Resource : [Press Enter to Generate a Password]
Enter the License Code Received in your Email : Qmmrj.
Do You Want to Display A QRCode ? [Y/N]N
https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=Hexa8MTOKN|C381CC0F468DF77C95E254CE0A437201B067EDBFD949EA270EE5FCD24B4F931455C43100EB13F85F05B3D3E25E68344E300E328FA08233B73EE6086B466E591E
------------------------------------------------------------------------------------------
Press Any Key Once QR Code Has Been Authorized Using HexaEight Authenticator Mobile App...
------------------------------------------------------------------------------------------
Please keep a browser handy since you need to authorize this QR Code. While you can also display the QR Code on the screen, you will need to make sure that the font size in your terminal is reduced to 8px to fit the QR Code on the screen.
Follow the below process to complete the authorization process and generate the Login Token generation for your machine. Remember you need to complete the authorization process within 2 minutes failing which the QR Code will become invalid and no longer be valid for authroization.
Press ENTER key after completeing the authorization, you should see a response as shown below with your new login token that is tied to your machine
Resource Server Generation Complete
------------------------------------
env-file will be located in /home/releaseuser/env-file
HEXAEIGHT_RESOURCENAME=auth.hexaeight.dns-dynamic.net
HEXAEIGHT_MACHINETOKEN=2XMdEEm2KV3g+y5ssxnnebqeQzJb30blVqL3iD27YJDFRsw+2oam2cfNDmfzVpFDupC09zDAMTyHXwXFFHYrLR2SzPYEMeam17jTkUfa1pyvydTrib/G5O4HQuarBItdmtmpMXYKTzVIdzhWrRDteUtTzeZ3chjzlS/rCnv8lkP+Gf34hIY/E+YnEFB6D47ZpMOMx6fB/AbHCkY2Ngkxnd7ztm0DnYe3KVkzHIzEPAboVoQ14wSU0komUb6Lx7T2wuMXDuVT7V7zqjQVz9expg==.QF2XqC63+sT/4DcirWy+F9ufwwJb6o0F8QKgjIBrNORGXxmJxmnz7o069gGHW3JAP0yqkYD8zq0/Od+kgCV10YWXC8j71A4eMjjR5CgAs/RueQ64JptTryT9kWwHQGWGKPLzrWwnNemAY402t9iQmI+mK1ySljXFV5WFIBdHkhk8S8Fpu06dNnyD5yiRseCw5JWD6r/yrw4TLRA/0V6vbKaNMSj/43YKu3B/sN4r13ctlxzxSXNM6qMXQXy1fMx6EX4HQbe6lruOwwCuDTl8KmRVXOdAKv5/fjMloRt9OzDlbXN7tXhwgO8nebrVk8p0nkAZ45QqtRvQT3vPaMtJ:omTTPXnp9IVwjfd6Wtzsy/Q+uGLp8o5Fu8OTdxezcwQZY04iXKz6kuSgC8FoDGGTDJlMH/Fi4E2GQ4l2ElYHCongTdQcRrfBtdNasnbB9nJhj1kE1KjnXiTr0pvvsvqcjvjzxyWLu5aKmK5lOPt0plTyf3t0cG4SrH9+JhQ4rcWBs3+5m2Pq4buOI07DE74NNRXnlRjCfEV4LSNG7tFnaMqBZMN7M4CQGvVsrRLCwXuvQ+3jg3ktF7udvNAAyCeDEX4HQbe6lruOwwCuDTl8KmRVXOdAKv5/fjMloRt9OzDlbXN7tXhwgO8nebrVk8p0nkAZ45QqtRvQT3vPaMtJ
HEXAEIGHT_SECRET=grNLpd647ixY8sJMjtS6iRptGIUq.NSOVNJQiy3Axoa9JhuyrpLPXRt
HEXAEIGHT_LICENSECODE=Qmmrj.
The env-file contains the details of your machine Token
This file will automatically be used by Token Server System Service during startup.
--------------------------------------------------------------------------------
Note: This Machine Token will work only on this Machine
Please ensure that you DO NOT touch or modify hexaeight.mac file
If you need reference the hexaeight.mac license file, please create a hardlink
---------------------------------------------------------------------------------
You need to ensure to set the above environment variables in your environment using export as shown below. You can also set these environment variables at boot or in your .profile to ensure they are automatically set for usage
export HEXAEIGHT_RESOURCENAME=auth.hexaeight.dns-dynamic.net
export HEXAEIGHT_MACHINETOKEN=2XMdEEm2KV3g+y5ssxnnebqeQzJb30blVqL3iD27YJDFRsw+2oam2cfNDmfzVpFDupC09zDAMTyHXwXFFHYrLR2S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LICENSECODE=Qmmrj.
HEXAEIGHT.MAC file
$ ls -al hexaeight.mac
-rw------- 2 releaseuser releaseuser 36 Aug 19 05:21 hexaeight.mac
- The hexaeight.mac file present in the directory contains the Machine License, you cannot move this License file else where after Login Token Generation. If you want to run multiple instances of Token Server, you need to create a hard link (NOT SYMBOLIC LINK) using ln command to this file and also call the target file as hexaeight.mac so that you can run multiple instances in differeent directories.
- DO NOT TRY TO COPY hexaeight.mac to another folder since that will INVALIDATE the license. Similarly if you accidently delete or lose this file, there is no way to recover your License unless you have backed up the machine and can use it restore back the license. Make sure your backup software backs up and restores the file as it is without modifying its creation date and last modification date. Note that HexaEight does not provide credit or replacement for lost or damanged licenses and its your responsiblity to safeguard the license file.
Renewing Token Server License
If you already have a valid Login Token for a machine and has expired, you can extend the validity of the License by simply using the --renewtoken flag using the Machine Token utility as shown below.
$ ./HexaEight-Machine-Tokens-Utility.exe --renewtoken
This Tool present in (C:\Data\machinetoken\ ) Generates Machine Login Tokens
----------------------------------------------------------------------------
Enter the License Code Received in your Email : 17pPci
Machine Token Renewal completed successfully
HEXAEIGHT_MACHINETOKEN=A2f3cfzTmUyaT4G+Vf0z3r4fzPo68D6aN049NLwNNuvDp2BaG87H7HgkvV4o8kObSB+B6MBGHrK6G+0nJcV6fwgraoVG9xrY73KPqirFMVsjkna+ex04t8WdrckICliPdtX9Y2L8LXdqoS1a7rFMUTRMvZuywlnA9MO78yfAplzWpWaDeK5f1yFhfVYEOFztTZzJv2Oe8XyrZeJ7gd6fNEHcr326K6Np8H5P11Qaeeidqnhi3pH9N9JP3Y0ixslM+NPEM/lFV5GwOxQjJqWM+fY4Ha/kux67Ph/ELsNs60c=.QF2XqC63+sT/4DcirWy+F9ufwwJb6o0F8QKgjIBrNORGXxmJxmnz7o069gGHW3JAP0yqkYD8zq0/Od+kgCV10YWXC8j71A4eMjjR5CgAs/RueQ64JptTryT9kWwHQGWGKPLzrWwnNemAY402t9iQmI+mK1ySljXFV5WFIBdHkhk8S8Fpu06dNnyD5yiRseCw5JWD6r/yrw4TLRA/0V6vbKaNMSj/43YKu3B/sN4r13ctlxzxSXNM6qMXQXy1fMx6EX4HQbe6lruOwwCuDTl8KmRVXOdAKv5/fjMloRt9OzDlbXN7tXhwgO8nebrVk8p0nkAZ45QqtRvQT3vPaMtJ:omTTPXnp9IVwjfd6Wtzsy/Q+uGLp8o5Fu8OTdxezcwQZY04iXKz6kuSgC8FoDGGTDJlMH/Fi4E2GQ4l2ElYHCongTdQcRrfBtdNasnbB9nJhj1kE1KjnXiTr0pvvsvqcjvjzxyWLu5aKmK5lOPt0plTyf3t0cG4SrH9+JhQ4rcWBs3+5m2Pq4buOI07DE74NNRXnlRjCfEV4LSNG7tFnaMqBZMN7M4CQGvVsrRLCwXuvQ+3jg3ktF7udvNAAyCeDEX4HQbe6lruOwwCuDTl8KmRVXOdAKv5/fjMloRt9OzDlbXN7tXhwgO8nebrVk8p0nkAZ45QqtRvQT3vPaMtJ
The env-file has been updated to reflect your new Token
Please restart Token Server System Service for the changes to take effect.
----------------------------------------------------------------------------
Once you hae renewed the token, you can continue using the same HEXAEIGHT_RESOURCENAME, HEXAEIGHT_SECRET and HEXAEIGHT_LICENSECODE along with the new extended HEXAEIGHT_MACHINETOKEN
The renewtoken has the capability to prolong the License even if it hasn't reached its expiration date. If you choose to renew a license before it expires, the extension will commence from the expiration time. However, if the license has already expired, the extension will be calculated from the current time.
- For instance, let's say you generated a login token using your 1 Day License code on January 1st, 2024 at 00:00 am. This License will then expire on January 1st, 2024 at 11:59 pm.
- Now, suppose you purchase a second 1 Day License code and use this new License code along with the renewtoken at any point on January 1st, 2024. The new License will then expire on January 2nd, 2024 at 11:59 pm.
- Let's assume you forgot to extend the License before January 2nd, 2024 at 11:59 pm and allowed the License to expire. From January 3rd, 2024 onwards, this license will no longer be usable. i - However, if you wish to reactivate the same License after its expiration, for example on January 7th, 2024 at 00:00, and you purchase another 1 Day License and renew it using the renewtoken flag, the new license will be valid until January 7th, 2024 at 11:59 pm. In other words, it uses the current time to determine the License's expiration.
Remeber that you can purchase Daily or Monthly Licenses. If you are looking for yearly License, we would suggest you reach out to HexaEight Support Team. One of the reasons we do not recommend the yearly License is simply because there is no way to transfer the Token License after it has been generated. It can only be revoked but you cannot claim credit for non usage or request the unused License to be transferred to another machine.