Skip to content

Instantly share code, notes, and snippets.

Created April 6, 2017 13:31
  • Star 16 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
curl -fsS \
--insecure \
"$address/json/login_session" \
--data "{\"method\":\"login\",\"user_login\":\"$username\",\"password\":\"$password\"}" |
sed 's/.*"session_key":"\([a-f0-9]\{32\}\)".*/\1/'
) || {
echo "Error retrieving session key" >&2
exit 1
cat >"$jnlp" <<eof
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="$address/" href="">
<title>Integrated Remote Console</title>
<j2se version="1.5+" href=""></j2se>
<jar href="$address/html/intgapp_228.jar" main="false" />
<property name="deployment.trace.level property" value="basic"></property>
<applet-desc main-class="com.hp.ilo2.intgapp.intgapp" name="iLOJIRC" documentbase="$address/html/java_irc.html" width="1" height="1">
<param name="RCINFO1" value="$session_key"/>
<param name="RCINFOLANG" value="en"/>
<param name="INFO0" value="7AC3BDEBC9AC64E85734454B53BB73CE"/>
<param name="INFO1" value="17988"/>
<param name="INFO2" value="composite"/>
<update check="background"></update>
nohup sh -c "$HOME/Applications/jre-8/bin/javaws -wait $jnlp; rm $jnlp" >/dev/null 2>&1 &
Copy link

nuriyevn commented May 31, 2018

java says unable to load
another version of java says class not found com.hp.ilo2.intgapp.intgapp.class
which is obviously because of can not find that file.
The question that must that file be in that location? and where is that location physically?

in other words, what do you think is the problem in the end?

thanks in advance.

Copy link

zersh01 commented Jun 26, 2018

for some version iLO need only JRE-1.5.0-16
Thanx for script!

Copy link

karlsenpark commented Apr 23, 2020

This script is still working great.

My client triggered this script is macOS Catalina 10.15.4.
iLO4 version on my HP Microserver Gen8 is 2.73 Feb 11 2020. Just upgraded it when trying this.
Then I have made some minor modifications to fit this code into my machine.

First off, followed by new iLO-jirc.jnlp, I've replaced line 33.
<jar href="$address/html/intgapp4_231.jar" main="false" />

Then, based on the folder, where javaws is located, I've updated line 47:
nohup sh -c "/usr/bin/javaws -wait $jnlp; rm $jnlp" >/dev/null 2>&1 &

Boom. all sorted.
Thanks for sharing this awesome code vbezhenar!

Copy link

Awesome, thanks!

Also had to change the address of the .jar file, which I found through the making the following request manually:

curl -v --insecure "$address/html/java_irc.html?sessionKey=$session_key&lang=en"

Copy link

@karlsenpark, @mfaerevaag: I create a slightly more user-friendly version and doesn't hardcode params. Should work with both iLO 3 & 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment