When using Pure Java Agent API, to register a host for a 5.x-type custom pure Java Agent, you must use smreghost.sh on UNIX, not smreghost executable, as documented.
By default, the script 'smreghost.sh' on UNIX is executed by /bin/ksh. The script file contains the below line at the beginning of the file.
If 'ksh' is not available on my computer, how do you execute the script in order to register a trusted host?
CA Single Sign-On SDK 12.5x
If 'ksh' is not available on your computer, you may use 'bash' instead in this case as the shell script content is compatible with bash.
Make a backup copy, and change the header line in the file as following (ksh -> bash).
Agent API Guidance for Java