<p>I use a tiny executable called SocketRelay for the same purpose. We borrowed it from VisIt.</p>
<div class="gmail_quote">On Mar 20, 2015 5:42 PM, "Burlen Loring" <<a href="mailto:burlen.loring@gmail.com">burlen.loring@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    there are 2 places I used netcat.<br>
    <br>
    1) ssh policy on login node only allows us to connect to ssh tunnels
    from localhost. using ncat there fools ssh into thinking we are
    connecting on localhost. I think it's dumb that we have to do this,
    but our sys admins refuse to make the change. The ssh option is
    called GatewayPorts.<br>
    <br>
    2) there is a different network protocol used on the compute nodes
    of our cray, the mom node understands that protocol and acts like a
    bridge to the login node. we create the tunnel from mom to login
    with netcat.<br>
    <br>
    there are other ways to forward the connections beside netcat, but
    it's easy to build, install, and use, and it's fast.<br>
    <br>
    <div>On 03/20/2015 02:26 PM, Vanmoer, Mark W
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      
      
      <div>
        <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hi
            Burlen,<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Are
            you using ncat to setup those connections because of a
            policy (like no outside network connections allowed) or for
            a technical reason?<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Mark<u></u><u></u></span></p>
        <div>
          <div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">
                Burlen Loring [<a href="mailto:burlen.loring@gmail.com" target="_blank">mailto:burlen.loring@gmail.com</a>]
                <br>
                <b>Sent:</b> Thursday, March 19, 2015 4:48 PM<br>
                <b>To:</b> Vanmoer, Mark W; David E DeMarle<br>
                <b>Cc:</b> <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
                <b>Subject:</b> Re: [Paraview] server configuration with
                two factor authentication?<u></u><u></u></span></p>
          </div>
        </div>
        <p class="MsoNormal"><u></u> <u></u></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt">Hi Mark,<br>
          <br>
          Yes to both. The way this could work on a simple cluster is:
          from the user's system which is assumed to be remote, the pvsc
          creates an ssh tunnel inside the xterm and calls the launch
          script on the compute system login node. the launch script
          submits the batch job. pvserver, when run in the batch script,
          connects back to the ssh tunnel on the login node. "client
          host" is the login node host name. "server port" is specified
          by the user in the pvsc.<br>
          <br>
          There's a slight complication with some Cray systems that
          means we need to involve a special node called the "mom" node
          in the tunnel.<br>
          <br>
          This will be clear if you see a complete example, for instance
          the following 3 scripts are used with NERSC's Cray Edison:<a href="https://github.com/burlen/pvserver-configs/blob/master/pvsc/edison-unix.pvsc" target="_blank">
            pvsc</a>,
          <a href="https://github.com/burlen/pvserver-configs/blob/master/servers/edison/4.3.1/start_pvserver.sh" target="_blank">launch
            script</a>, <a href="https://github.com/burlen/pvserver-configs/blob/master/servers/edison/4.3.1/start_pvserver.qsub" target="_blank">batch
            script</a>.<br>
          <br>
          Burlen<u></u><u></u></p>
        <div>
          <p class="MsoNormal">On 03/19/2015 02:24 PM, Vanmoer, Mark W
            wrote:<u></u><u></u></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">This
              great, thanks for sharing, guys. Using xterm would have
              never occurred to me.</span><u></u><u></u></p>
          <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
          <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Are
              you setting the pvserver –client-host somehow? My old pvsc
              from Forge sent over the client’s hostname to the script.
              I tried that on Blue Waters and it works, but do I not
              need to actually do that? Also, are either of you setting
              –server-port in the launch script?</span><u></u><u></u></p>
          <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
          <p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
          <p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">
              David E DeMarle [<a href="mailto:dave.demarle@kitware.com" target="_blank">mailto:dave.demarle@kitware.com</a>]
              <br>
              <b>Sent:</b> Thursday, March 19, 2015 1:28 PM<br>
              <b>To:</b> Burlen Loring<br>
              <b>Cc:</b> Vanmoer, Mark W; <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
              <b>Subject:</b> Re: [Paraview] server configuration with
              two factor authentication?</span><u></u><u></u></p>
          <p class="MsoNormal"> <u></u><u></u></p>
          <div>
            <p class="MsoNormal">I liked this bit too as the windows
              version 'xterm -e ssh &'.<br>
              <br>
              <Command exec="cmd.exe" delay="10"><br>
              <Arguments><br>
              <Argument value="/C"/><br>
              <Argument value="start"/><br>
              <Argument value="cmd.exe"/><br>
              <Argument value="/C"/><br>
              <Argument value="$SSH_EXEquot;/><br>
              <br>
              Since windows isn't my first language, that took more
              hunting than I'ld like to admit. :)<u></u><u></u></p>
          </div>
          <div>
            <p class="MsoNormal"><br clear="all">
              <u></u><u></u></p>
            <div>
              <div>
                <p class="MsoNormal">David E DeMarle<br>
                  Kitware, Inc.<br>
                  R&D Engineer<br>
                  21 Corporate Drive<br>
                  Clifton Park, NY 12065-8662<br>
                  Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a><u></u><u></u></p>
              </div>
            </div>
            <p class="MsoNormal"> <u></u><u></u></p>
            <div>
              <p class="MsoNormal">On Thu, Mar 19, 2015 at 2:18 PM,
                Burlen Loring <<a href="mailto:burlen.loring@gmail.com" target="_blank">burlen.loring@gmail.com</a>>
                wrote:<u></u><u></u></p>
              <blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
                <div>
                  <pre>"&quot;C:\Program Files (x86)\PuTTY\plink.exe&quot;"<u></u><u></u></pre>
                  <pre> <u></u><u></u></pre>
                  <pre>so that's the secret to paths with spaces! nice, thanks for sharing that!<u></u><u></u></pre>
                  <div>
                    <div>
                      <div>
                        <p class="MsoNormal">On 03/19/2015 09:22 AM,
                          David E DeMarle wrote:<u></u><u></u></p>
                      </div>
                      <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                        <div>
                          <p class="MsoNormal">Howdy Mark, <u></u><u></u></p>
                          <div>
                            <p class="MsoNormal"> <u></u><u></u></p>
                          </div>
                          <div>
                            <p class="MsoNormal">Adding to what Burlen
                              said.<u></u><u></u></p>
                          </div>
                          <div>
                            <p class="MsoNormal"> <u></u><u></u></p>
                          </div>
                          <div>
                            <p class="MsoNormal">You can grab pvsc
                              examples for ORNL, ANL and NERSC via<u></u><u></u></p>
                          </div>
                          <div>
                            <p class="MsoNormal">paraview->File->Connect…
                              Fetch servers.<u></u><u></u></p>
                          </div>
                          <div>
                            <p class="MsoNormal">//File->Conenct…FetchServers->Edit
                              Sources replace with pvsc
                              <a href="http://www.paraview.org/files/pvscWindows" target="_blank">http://www.paraview.org/files/pvscWindows</a>
                              Kitware Inc. on windows.<u></u><u></u></p>
                          </div>
                          <div>
                            <p class="MsoNormal">Mac requires XQuartz,
                              windows requires putty.<u></u><u></u></p>
                          </div>
                          <div>
                            <p class="MsoNormal"> <u></u><u></u></p>
                          </div>
                          <div>
                            <p class="MsoNormal">Let me know when you
                              get it working, with your permission I'ld
                              love to add NCSA (and everywhere else)
                              there so that users get it by default.<u></u><u></u></p>
                          </div>
                          <div>
                            <p class="MsoNormal"> <u></u><u></u></p>
                          </div>
                          <div>
                            <p class="MsoNormal"> <u></u><u></u></p>
                          </div>
                          <div>
                            <p class="MsoNormal"><br clear="all">
                              <u></u><u></u></p>
                            <div>
                              <div>
                                <p class="MsoNormal">David E DeMarle<br>
                                  Kitware, Inc.<br>
                                  R&D Engineer<br>
                                  21 Corporate Drive<br>
                                  Clifton Park, NY 12065-8662<br>
                                  Phone: <a href="tel:518-881-4909" target="_blank">518-881-4909</a><u></u><u></u></p>
                              </div>
                            </div>
                            <p class="MsoNormal"> <u></u><u></u></p>
                            <div>
                              <p class="MsoNormal">On Thu, Mar 19, 2015
                                at 11:56 AM, Burlen Loring <<a href="mailto:burlen.loring@gmail.com" target="_blank">burlen.loring@gmail.com</a>>
                                wrote:<u></u><u></u></p>
                              <blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
                                <div>
                                  <p class="MsoNormal">Hi Mark,<br>
                                    <br>
                                    This works without anything special
                                    if you launch in an xterm. We did
                                    this at NICS which requires both ssh
                                    authentication and rsa secure id
                                    token. Here is an
                                    <a href="https://github.com/burlen/pvserver-configs/blob/master/pvsc/edison-unix.pvsc" target="_blank">
                                      example</a> <br>
                                    <br>
                                    Burlen <u></u><u></u></p>
                                  <div>
                                    <div>
                                      <p class="MsoNormal" style="margin-bottom:12.0pt"> <u></u><u></u></p>
                                      <div>
                                        <p class="MsoNormal">On
                                          03/19/2015 06:50 AM, Vanmoer,
                                          Mark W wrote:<u></u><u></u></p>
                                      </div>
                                    </div>
                                  </div>
                                  <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                                    <div>
                                      <div>
                                        <div>
                                          <p class="MsoNormal">Hi,
                                            is there a way to set up the
                                            server XML so that it works
                                            with two factor
                                            authentication, as in a
                                            token generator? This is for
                                            the Blue Waters machine at
                                            NCSA. What I mean is,
                                            something like how VisIt
                                            acts, which when doing the
                                            connection will prompt for
                                            the password and token.<u></u><u></u></p>
                                          <p class="MsoNormal"> <u></u><u></u></p>
                                          <p class="MsoNormal">In
                                            the past, on machines
                                            without two factor auth,
                                            I’ve used
                                            <u></u><u></u></p>
                                          <p class="MsoNormal"> <u></u><u></u></p>
                                          <p class="MsoNormal"><a href="http://www.paraview.org/Wiki/ParaView:Server_Configuration#Case_Eleven:_Launch_pvserver_on_a_cluster_using_PBS_-_use_reverse_connection_to_client" target="_blank">http://www.paraview.org/Wiki/ParaView:Server_Configuration#Case_Eleven:_Launch_pvserver_on_a_cluster_using_PBS_-_use_reverse_connection_to_client</a><u></u><u></u></p>
                                          <p class="MsoNormal"> <u></u><u></u></p>
                                          <p class="MsoNormal">but
                                            that requires having ssh
                                            keys set up.
                                            <u></u><u></u></p>
                                          <p class="MsoNormal"> <u></u><u></u></p>
                                          <p class="MsoNormal">Thanks,<u></u><u></u></p>
                                          <p class="MsoNormal">Mark<u></u><u></u></p>
                                        </div>
                                        <p class="MsoNormal" style="margin-bottom:12.0pt"> <u></u><u></u></p>
                                      </div>
                                    </div>
                                    <pre>_______________________________________________<u></u><u></u></pre>
                                    <pre>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><u></u><u></u></pre>
                                    <pre> <u></u><u></u></pre>
                                    <pre>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><u></u><u></u></pre>
                                    <pre> <u></u><u></u></pre>
                                    <pre>Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><u></u><u></u></pre>
                                    <pre> <u></u><u></u></pre>
                                    <pre>Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">http://markmail.org/search/?q=ParaView</a><u></u><u></u></pre>
                                    <pre> <u></u><u></u></pre>
                                    <pre>Follow this link to subscribe/unsubscribe:<u></u><u></u></pre>
                                    <pre><a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><u></u><u></u></pre>
                                  </blockquote>
                                  <p class="MsoNormal"> <u></u><u></u></p>
                                </div>
                                <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
                                  Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
                                  <br>
                                  Visit other Kitware open-source
                                  projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
                                  <br>
                                  Please keep messages on-topic and
                                  check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
                                    http://paraview.org/Wiki/ParaView</a><br>
                                  <br>
                                  Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">
http://markmail.org/search/?q=ParaView</a><br>
                                  <br>
                                  Follow this link to
                                  subscribe/unsubscribe:<br>
                                  <a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><u></u><u></u></p>
                              </blockquote>
                            </div>
                            <p class="MsoNormal"> <u></u><u></u></p>
                          </div>
                        </div>
                      </blockquote>
                      <p class="MsoNormal"> <u></u><u></u></p>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
            <p class="MsoNormal"> <u></u><u></u></p>
          </div>
        </blockquote>
        <p class="MsoNormal"><u></u> <u></u></p>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div>