31 Replies Latest reply: Dec 19, 2008 12:15 PM by vlhchi RSS

Integrate Java SSH into Orion 7.8

Currently Being Moderated
I wanted to add the ability to SSH into a Cisco device from the Orion web interface, just like one can do Telnet, Remote Desktop, etc.  So I created a seamless integration that creates an "S" icon right next to the "T", and launches a new window with a Java SSH client.

I give credit to those who have posted before me which directed me towards the MindTerm Java SSH client.  The remainder of the other posts I found did not apply to the files in Orion 7.8.

I had to do a lot of research on exactly how best to set this up.  I'm extremely happy with the results.  Rather than give you a vague idea of how to do it, I wrote up this procedure that gives you explicit details, so even if you don't know how this all works, you can still get it done.

Better still, everything I mention here you can get for free (expect for Orion, of course =).

Here we go...

1. Open the file \Inetpub\SolarWinds\NetPerfMon\Resources\2-1-NodeDetails\01-NodeDetails.Resource.
2. Look for the following section of code...

     <% SWToolsetIcon "Telnet",Node.GetProperty("IP_Address")%>
     <% SWToolsetIcon "PING",Node.GetProperty("ParamString")%>

    Between these two lines, insert in the following code:

<a target='_blank' href="/NetPerfMon/SSH/SSH.asp?ip=<%=Node.GetProperty("IP_Address")%>"><img

src="images\Small.SSH.gif" alt="SSH to <%=Node.GetProperty("IP_Address")%>" Border=0></a>

3. Open the file \Inetpub\SolarWinds\NetPerfMon\images\Small.Telnet.gif.  Modify it to show an "S" instead of a "T" and save it as a transparent GIF with the filename "Small.SSH.gif" in the same directory.  You can also use a program to convert it to a transparent gif, such as Giffy (free).

4. Create a directory named \Inetpub\SolarWinds\NetPerfMon\SSH.

5. In that directory, create a file called SSH.asp with the following code:

<APPLET CODE="com.mindbright.application.MindTerm.class"
ARCHIVE="mindterm-obf.jar" WIDTH=100% HEIGHT=100%>
<PARAM NAME="server" VALUE=<%=CStr(Request("ip"))%>>
<PARAM NAME="sepframe" value="false">
<PARAM NAME="debug" value="false">
<PARAM NAME="protocol" value="ssh1">
<PARAM NAME="ssh1-cipher" value="3des-cbc">
</APPLET>

6. Download and extract the (free) MindTerm SSH Java client from www.appgate.com.  Place the files in this SSH directory.

7. Download and install the J2EE SDK package from Sun (free).

8. Run the following commands to create a fake certificate for the Java .JAR files (required for it to work):

(Generate a public/key pair)
keytool -genkey -keyalg RSA -alias fake -dname "CN=domain.com, OU=domain, O=Your Organization, L=Your Location, S=TX, C=US, EMAILADDRESS=nobody@nowhere.com"
(Generate the self-signed certificate)
keytool -selfcert -alias fake
(Export the self-signed certificate in x.509 printable format, public key only)
keytool -export -alias fake -rfc -file fake.cer
(Sign the JAR file)
jarsigner.exe [jar file in the SSH directory] fake

9. You can manually install this certificate on end-user management stations if you want.  Try it first, if it doesn't work (get an error about unable to connect) then run this:

keytool -import -keystore J:\Program Files\java\jdk1.5.0\jre\lib\security\cacerts -alias fake -file fake.cer

Of course you'll need to correct for the Java runtime directory and the location of the fake.cer file.

Now you're done.  Go ahead and try it.  If it gives you problems, try clearing your browser cache.  It will launch the Java SSH client in a new window.  You'll have the ability to capture output to disk, scroll back buffers, etc.  All very cool.  To access the menu for all the options inside the SSH client, click CTRL+RIGHT MOUSE BUTTON.

Keep in mind that the fake certificate expires in 6 months so you'll need to redo it or extend it out longer.  You can also buy the

AppGate MindTerm software, which will include a real certificate.  It's a good product, I encourage you to do so.

Also keep in mind that as SolarWinds updates the product, the resource file we modified in step 2 may change.  You may need to
repeat that step when you get updates.

I hope you all enjoy!

Ian Robertson
  • Re: Integrate Java SSH into Orion 7.8
    Network_Guru
    Currently Being Moderated
    Thanks a lot Ian, that's great!

    I started down the same road with MindTerm, but was having trouble creating the fake Cert. This now gives everyone several different options to implement SSH.

    We are very happy with our implementation of Putty with Orion, using the Reg Hack to make it the default Telnet/SSH client in IE. Once I upgrade to V7.8 next week, I may use the right click option to start the SSH client instead.

    -=Cheers=-
              NG
  • Re: Integrate Java SSH into Orion 7.8
    Currently Being Moderated
    Wow
    Very nice job, I really want to try It!
    Your procedure is clear and easy to understand
  • Re: Integrate Java SSH into Orion 7.8
    Currently Being Moderated
    I've done all that and get this error...
    Error connecting to xxx.xxx.xxx.xxx, reason:
    -> access denied (java.net.SocketPermission xxx.xxx.xxx.xxx:22 connect,resolve)

    Of course the x's are numbers

    Chris Welch
  • Re: Integrate Java SSH into Orion 7.8
    jtimes
    Currently Being Moderated
    I have done this and absolutley love it!!!  Thanks Ian.

    One concern that I have is when V8 comes out, will it have this capability built in?  Or will I have to re-do Ian's proceedure (if it is still valid in v8???)

    John J. Times
  • Re: Integrate Java SSH into Orion 7.8
    Currently Being Moderated
    This sort of functionality should be built into Orion. For security reasons, we're not allowed to enable Telnet on most of our network devices, so the current Telnet function doesn't help much. Having a T and an S button would be pretty handy!
  • Re: Integrate Java SSH into Orion 7.8
    ACDII
    Currently Being Moderated
    One down, one to go. This solved the SSH problem we had, works great. Now if I can only figure out how to make the web page send a sound the way Whatsup gold does I will be very happy.
  • Re: Integrate Java SSH into Orion 7.8
    jtimes
    Currently Being Moderated

    This is my all time favorite post...  Now that I found it again I'll have to give this another shot in 8.1


    If anyone gets it to work in 8.1 post your code... :)

    • Re: Integrate Java SSH into Orion 7.8
      rdeprez
      Currently Being Moderated

      This is my all time favorite post...  Now that I found it again I'll have to give this another shot in 8.1

      If anyone gets it to work in 8.1 post your code... :)

       

      I followed Ian's Excellent instructions and with a few changes got this to work in 8.1.

      I downloaded the AdvancedNodeDetails.resource from the customer download area on the solarwinds.net site here http://support.solarwinds.net/support/Unsupported.cfm?Option=Orion. There is a readme.txt in that download that covers installing it and altering the view to use it instead of the standard details resource.

      Then I made the below modifications to that file(01-AdvancedNodeDetails.Resource) where it had text links before, because I liked the icons...but you can keep the text if you like.

       <tr>
         <td class="Property" width="10"> </td>
         <td class="PropertyHeader">Telnet</td>
         <td class="Property"> </td>
         <td class="Property"><a href="
      telnet://<%=Node.GetProperty("IP_Address")%>"><img src="images\Small.telnet.gif" mce_src="images\Small.telnet.gif" alt="Telnet to <%=Node.GetProperty("IP_Address")%>" Border=0></a> </td>
       </tr>
       <tr>
         <td class="Property" width="10"> </td>
         <td class="PropertyHeader">SSH</td>
         <td class="Property"> </td>
         <td class="Property"><a target='_blank' href="/NetPerfMon/SSH/SSH.asp?ip=<%=Node.GetProperty(" mce_href="/NetPerfMon/SSH/SSH.asp?ip=<%=Node.GetProperty("IP_Address")%>"><img src="images\Small.SSH.gif" mce_src="images\Small.SSH.gif" alt="SSH to <%=Node.GetProperty("IP_Address")%>" Border=0></a> </td>
       </tr>
       <tr>
         <td class="Property" width="10"> </td>
         <td class="PropertyHeader">Web Browse</td>
         <td class="Property"> </td>
         <td class="Property"><a href="
      http://<%=Node.GetProperty("IP_Address")%>"><img src="images\Small.goto.gif" mce_src="images\Small.goto.gif" alt="Browse to <%=Node.GetProperty("IP_Address")%>" Border=0></a> </td>
       </tr>

      Then I followed Ian's steps 3 and 4.

      I changed the code(shown below) in step 5 a little to match the options in the latest version of mindterm and to make it resize the window and allow the menu when doing the ctrl+right mouse click. Still save it as explained by Ian as SSH.asp.

      <HTML>

      <SCRIPT>

      window.resizeTo(600,800);

      </SCRIPT>

      <APPLET CODE="com.mindbright.application.MindTerm.class"

      ARCHIVE="mindterm.jar" WIDTH=100% HEIGHT=100%>

      <PARAM NAME="server" VALUE=<%=CStr(Request("ip"))%>>

      <PARAM NAME="cabinets" VALUE="mindterm.cab">

      <PARAM NAME="sepframe" value="false">

      <PARAM NAME="debug" value="false">

      <PARAM NAME="menus" value="popN">

      </APPLET>

      </HTML>

      Then I followed steps 6, 7, and 8 per Ian's guide.

      I had to make sure that my browser was set to use the Java JVM and not the MS JVM as the latest mindterm does not support it. After that it works great!

      A great big thanks to Ian for spending the time to figure this out!

      • Re: Integrate Java SSH into Orion 7.8
        Currently Being Moderated

        I am trying to follow your wonderfully detailed instructions, but I have obviously missed something along the way :) 

        When I click on a node in Orion to see the details, I get the following error where I would expect to see the links for telnet, ssh...

         

        Microsoft VBScript compilation error '800a0408'

        Invalid character

        /NetPerfMon/Resources/2-1-NodeDetails/01-AdvancedNodeDetails.Resource, line 94

        Response.Write(Node.GetProperty(" mce_href="/NetPerfMon/SSH/
        SSH.asp?ip=<%=
        Node.GetProperty("IP_Address"))-------------------------------------------------------------------^
         Note: Not sure if the location of the ^ underneath is
        significant, but in my browser,
        it appears right under the ? between SSH.asp?ip=
         
        Thanks,
        John
        • Re: Integrate Java SSH into Orion 7.8
          Mithrilhall
          Currently Being Moderated

          Do you get the same message if you try to visit the following in a browser?

          (replace 'YourServername' and 'NodeIPAddress' with the appropriate information)

          http://YourServerName/NetPerfMon/SSH/SSH.asp?ip=NodeIPAddress)
        • Re: Integrate Java SSH into Orion 7.8
          rdeprez
          Currently Being Moderated

          I am trying to follow your wonderfully detailed instructions, but I have obviously missed something along the way :) 

          When I click on a node in Orion to see the details, I get the following error where I would expect to see the links for telnet, ssh...

           

          Microsoft VBScript compilation error '800a0408'

          Invalid character

          /NetPerfMon/Resources/2-1-NodeDetails/01-AdvancedNodeDetails.Resource, line 94

          Response.Write(Node.GetProperty(" mce_href="/NetPerfMon/SSH/
          SSH.asp?ip=<%=
          Node.GetProperty("IP_Address"))-------------------------------------------------------------------^
           Note: Not sure if the location of the ^ underneath is
          significant, but in my browser,
          it appears right under the ? between SSH.asp?ip=
           
          Thanks,
          John

           



           

          Does the "Response.Write(Node.GetProperty(" mce_href="/NetPerfMon/SSH/SSH.asp?ip=<%=Node.GetProperty("IP_Address"))" line appear anywhere in your 01-AdvancedNodeDetails.Resource file?

  • Re: Integrate Java SSH into Orion 7.8
    bashley
    Currently Being Moderated

    I would LOVE to get this implemented in our setup.  I tried following the instructions above but the Java app fails to load once I click on the 'S'.  PLEASE is there anyone who can help me with this...

  • Re: Integrate Java SSH into Orion 7.8
    crwchief6
    Currently Being Moderated

    Does anyone have this configured for version 9.0 SP1? I tried the instructions posted on this topic but when I get to \Inetpub\SolarWinds\NetPerfMon\Resources\2-1-NodeDetails\01-NodeDetails.Resource I do not have anything called


    <% SWToolsetIcon "Telnet",Node.GetProperty("IP_Address")%>
    <% SWToolsetIcon "PING",Node.GetProperty("ParamString")%>


    Has anyone added the SSH icon from scratch using this new version? I wonder if things have changed with the new version and it has moved but I would like to be able to add the SSH icon next to the Telnet icon on the Node Details page if possible.


    Thanks.



     

    • Re: Integrate Java SSH into Orion 7.8
      qle
      Currently Being Moderated
      null
      • Re: Integrate Java SSH into Orion 7.8
        tdanner
        Currently Being Moderated
        <a href='' target="_blank">
        <img src="/Orion/images/ToolsetIntegration/Small.SSH.gif" alt="Open an SSH session to " title="Open an SSH session to " />
        </a>
         

        Looks like part of this is missing. Don't you need to reference the hostname or IP address somehow?

        • Re: Integrate Java SSH into Orion 7.8
          qle
          Currently Being Moderated
          Tim, thanks for catching that. The first line should read:



          <a href='<%= string.Format("/NetPerfMon/RemoteDesktop.asp?Server={0}", this.MyNode.IPAddress) %>' target="_blank">



          It was there when I originally composed it. It looks like Community Server tried to process that part of the message.
          • Re: Integrate Java SSH into Orion 7.8
            Hock
            Currently Being Moderated

            Is there a way to add this function as a right click selection on NPM Gui?

          • Re: Integrate Java SSH into Orion 7.8
            crwchief6
            Currently Being Moderated

            Thanks qle for that information. I will give it a try and see what happens.

            • Re: Integrate Java SSH into Orion 7.8
              crwchief6
              Currently Being Moderated

              Well I started trying the solution and after reading further on the very first post I noticed he was using MindTerm. We use SecureCRT so now I am at a stand still. I have tried to figure out what he did using MindTerm but cannot seem to recreate it using SecureCRT. Does anyone have an SSH shortcut under node details that uses this? If so would you please help get me in the right direction?


              Thanks for any help.

              • Re: Integrate Java SSH into Orion 7.8
                crwchief6
                Currently Being Moderated

                OK I finally figured it out for anyone interested. I hope I did not leave anything out since I just stumbled upon this.


                1. Import the registry setting for SecureCRT SSH2 from their website into the registry on the pc using SecureCRT. Here is the registry setting:


                [HKEY_CLASSES_ROOT\ssh2\shell\open\command]
                @="\"C:\\Program Files\\SecureCRT\\SecureCRT.exe\" %1"


                2. Added the following line into \InetPub\SolarWinds\Orion\NetPerfMon\Controls\IntegrationIcons.ascx in between the 'goto' and 'telnet' command (actually I just copied the telnet statement and pasted it and changed anything that said telnet to ssh2).


                <a href='<%= string.Format("ssh2://{0}", this.MyNode.IPAddress) %>'>
                    <img src="/Orion/images/ToolsetIntegration/Small.SSH.gif" alt="Open a SSH session to <%= this.MyNode.Name %>"
                         title="Open a SSH session to <%= this.MyNode.Name %>" />


                </a>


                 


                3. I created the Small.SSH.gif and put it in \InetPub\SolarWinds\Orion\images\ToolsetIntegration


                Thanks to all those who helped get me started.



                 

      • Re: Integrate Java SSH into Orion 7.8
        Currently Being Moderated

        Hi all,
        In my case, I followed Ian's instructions with some changes:
        Step 1) Open \Inetpub\SolarWinds\Orion\NetPerfMon\Controls\IntegrationIcons.ascx as qle posted above and add:
        <a href='<%= string.Format("SSH/SSH.asp?Server={0}", this.MyNode.IPAddress) %>' target="_blank">
        <img src="/Orion/images/ToolsetIntegration/Small.SSH.gif" alt="Open an SSH session to " title="Open an SSH session to <%= this.MyNode.Name %>" />
        </a>

        Step 4) Create "C:\Inetpub\SolarWinds\Orion\NetPerfMon\SSH". It will give me error on Java mindterm.jar if I follow Ian's (C:\Inetpub\SolarWinds\NetPerfMon\SSH.)  Dunt know why???

        Step 5) Made change in SSH.asp:
        <PARAM NAME="server" VALUE=<%=CStr(Request("server"))%>>

        Another thing, if you want to make the Telnet icon workable, you also have to modified IntegrationIcons.ascx  (in step1):
        <a href='<%= string.Format("telnet://{0}", this.MyNode.IPAddress) %>'>
            <img src="/Orion/images/ToolsetIntegration/Small.Telnet.gif" alt="Open a Telnet session to <%= this.MyNode.Name %>"
                 title="Open a Telnet session to <%= this.MyNode.Name %>" />
        </a>

        Good luck!

More Like This

  • Retrieving data ...