4 - 29   Loading Remote Data using Tecplot SZL Server

Tecplot SZL Server is a a lightweight server that you can install on a remote Linux host (such as a computer cluster) to get access to your data when it is not practical to move the data off the cluster to a local drive or to a network file share, and when you cannot reasonably run Tecplot 360 EX on the remote host using a remote desktop setup. Usually this is due to slower network speeds between the remote host and the visualization workstation.

Tecplot SZL Server runs only on Linux hosts and serves only SZL data, since it is the subzone loading capability of SZL format that makes it practical to visualize your data over slower connections. Clients can be any platform supported by Tecplot 360 EX.

You can load SZL data from a remote host using Tecplot SZL Server using the Load Remote Data command on the Tecplot 360 EX File menu. Choose Load Remote Data command on the Tecplot 360 EX File menu to open the Remote Data Load Options dialog.

remote_data_load_options.png

note00083.pngThe first time you use Load Remote Data on Windows, Windows may display a dialog asking you to allow Tecplot 360 EX to listen for connections. You must grant this permission to allow Tecplot 360 EX to load remote data.

The Remote Data Load Options dialog offers three ways to connect to the remote SZL Server:

SSH Tunneled Connection - Uses a secure shell (SSH) connection to carry the data from the server to the workstation so it can be visualized in Tecplot 360 EX. As long as you can connect to the remote host via SSH, you can visualize data from a SZL Server running on that host; the SSH connection is all that is needed. This minimizes any possible network and workstation complications.

Direct Connection - May offer better performance than a SSH tunnel, but with less security, because the data is not encrypted. (A SSH connection still must be established to start the server, but the actual data is sent to the workstation without encryption.) The remote host must be able to establish a connection to arbitrary ports on the visualization workstation, which may require setup from a network administrator or may even be disallowed entirely at your site.

You might use Direct Connection mode if your network is already secure (for example, when using a VPN or WAN) and the encryption provided by SSH would be redundant, or if performance is paramount.

Manual Connection - This mode allows you to establish a SZL Server session by manually issuing a command on the remote host. Each time you establish a manual connection, Tecplot 360 EX provides you with an appropriate command that can be used for this purpose.

By default, SZL Server connection is made directly from the remote host to the workstation as in Direct Connection mode described above. However, you can also establish an SSH tunnel manually and run your SZL Server session through it. See “Manual Connection Mode” on page 123 for details.

If you are using either of the first two modes, choose it in the dialog, then specify:

• The hostname or IP address of the remote host

• Your username on that host

• How you wish Tecplot 360 EX to authenticate to the remote host, using one of these options:

Your private key file (specify the file by entering the path or by clicking "..."). If your key is protected by a passphrase, enter it in the field provided.

A key manager: ssh-agent (or PuTTY's Pageant utility on Windows).

Without a key (you will be prompted for a password when you connect)

Then click the Connect button to establish the connection. This may take a few seconds.

note00084.pngIf you are using Manual Connection mode, you will instead see a small window indicating the command you must execute on the remote host to establish the connection. See “Manual Connection Mode” on page 123 for details on using this mode.

Once the connection has been established, the Select Files button becomes enabled. Click Select Files to choose a file to open. The Select File dialog appears.

remote_select_file.png

note00085.pngAll remote files open at any one time must be opened from the same directory on the same remote host. You cannot append data using remote files.

After you choose the files you wish to open and click Open, you return to the Load Remote Data dialog with those files listed in the bottom panel. Click OK to proceed with opening the files. Tecplot 360 EX opens the files and displays the initial plot.

4 - 29.1   Manual Connection Mode

In Manual Connection mode, you establish an SSH connection to the remote host yourself, then start the server and tell it how to connect back to the Tecplot 360 EX client running on your workstation. This is useful for unusual network configurations and for those who require complete control.

remote_wait.png

When you click Connect in the Remote Data Load options with the mode set to Manual Connection, Tecplot 360 EX displays the Waiting For Server Connection dialog. This dialog remains open until you establish the connection from the remote host. To do this, you must issue a command on the host to start SZL Server and tell it how to connect to Tecplot 360 EX on the client workstation.

The szlserver command shown in the dialog can be copied and pasted into your remote command line session (established with the ssh command on Linux or Mac, or a GUI client like PuTTY on Windows). Usually, you will establish a new SSH connection, but it is possible to use an existing one (see the Note at the end of this section). For this example, we will establish a new connection.

When invoked using the provided szlserver command, SZL Server establishes a direct, unencrypted connection to the workstation (as in Direct Connection mode). This requires that arbitrary ports on your workstation be accessible from the server, which may require network administrator support or be disallowed entirely at your site.

If it is not possible for the server to connect to the workstation, or if you wish the session to be encrypted, you can manually tunnel the connection over an SSH connection. You will need to know the port number on which Tecplot 360 EX is waiting for the connection. This is the number following the -p flag in the szlserver command shown in the Waiting For Server Connection dialog.

You should note the session key, which is the number following -k. The session key is a random number that is changed for each connection; it is used to verify that the connection is being made to the correct workstation. When you issue the szlserver command on the remote host, you must use the session key displayed in the Waiting For Server Connection dialog.

In the example dialog shown here, Tecplot 360 EX is listening on port 49767. So you need to establish a tunnel from port 49767 on the remote host to port 49767 on your workstation.

note00086.pngYou may use a different port number on the remote host if the port you wish to use is already in use on that system, but this is quite rare. If there is a port conflict, it is probably best to close the Load Remote Data Options dialog and try again; Tecplot 360 EX chooses a different port each time you open the dialog. Alternatively, specify 0 for the remote port; ssh will choose an available port for you and tell you what it is.

Valid port numbers range from 1024-65535. Ports with numbers less than 1024 can only be opened by the remote host's root user.

On Linux or Mac systems, you can create the tunnel using the -R option with the ssh command line client. In this command, localhost refers to the workstation running Tecplot 360 EX, the client of the ssh connection (the hostname is resolved on the client end).

ssh -R 49767:localhost:49767 username@remote.host

If you are using a server port number different from the workstation port, the server port number should be the first number after the -R. For example, if you have decided to use port 4242 for the server end of the tunnel, the ssh command would be:

ssh -R 4242:localhost:49767 username@remote.host

On Windows, you can set up port forwarding in PuTTY on the Connections > SSH > Tunnels page.

remote_putty_port_forwarding.png

Enter (in this example) 49767 for the source port, localhost:49767 as the destination, and choose the Remote radio button. (If you are using a different port number on the server than on the workstation, it goes in the Source Port field.) Then click Add to add the tunnel to the forwarded ports list. When you click Open to establish the SSH connection, the tunnel is created along with it.

One you have established an SSH connection with the remote host, incorporating a tunnel, you can issue the szlserver command on the remote host. However, instead of specifying the address of the client workstation after -m, specify localhost. This will instruct SZL Server to connect to the host's end of the tunnel, which will forward the connection to the workstation.

szlserver -m localhost -p 49767 -k 1443240310

If you are using a different port number on the remote host, specify this after -p. For example, if you are using port 4242 for the remote end of the tunnel, use:

szlserver -m localhost -p 4242 -k 1443240310

note00087.pngOn Windows, PuTTY lets you add tunnels to an existing connection. Simply click the icon in your SSH terminal's upper left corner, choose Change Settings from the menu, and navigate to Connection>SSH>Tunnels as if you were setting up a new connection. From there, you can remove any obsolete port forwarding and add new tunnels as needed.

On Linux and Mac, you can type ~C to escape into a mini command line from an established session, then enter an -R option exactly as you would on the command line to set up a port forward (e.g. -R 49767:localhost:49767). To cancel an existing tunnel, enter -KR 49767 (for example) using the remote port number of the tunnel. Press Enter to exit the mini command line and return to your SSH session.

This feature may not be available depending on SSH client configuration. If it is not available, simply open a new terminal window and establish a new SSH connection incorporating the desired tunnelling.

4 - 29.2   Interactive Authentication and Unattended Operation

Depending on your organization's network and security policies, you might need to enter information to prove your identity when connecting to a SZL Server via SSH. This information might include:

• An account password, if you are not using a key pair

• A passphrase for a protected private key or key store

• A security code from an authentication token or app (such as Google Authenticator)

Or, if you are using Manual Connection mode, you must enter a command on the remote host in order to establish the connection.

Tecplot 360 EX prompts you to enter any necessary authentication information or take other action to establish the connection to SZL Server as necessary. When running Tecplot 360 EX interactively—with its full graphical user interface—a dialog appears to request your password or to ask you to perform other steps.

When you record a connection to a SZL Server in a macro, the most that is ever stored in the macro is the path to your private key file. The key itself and its passphrase are never stored; likewise, if you are using password authentication, the password is not stored. Therefore, for batch operations—such as running a macro from the command line—the Linux and Mac versions of Tecplot 360 EX will prompt you to enter this information in the terminal window if it is necessary.

Similarly, the macro file does not store any manual steps you do when establishing a connection via Manual mode, because these steps are done outside Tecplot 360 EX. So when connecting via the Manual connection mode in batch mode, you will be instructed in the terminal to establish the connection, and Tecplot 360 EX will wait for the connection to be established.

The Windows version of Tecplot 360 EX detaches from the text console and cannot read or write to the command line window. Therefore, the $!READDATASET macro instruction fails in batch mode on Windows if any additional information or action is needed to connect to the remote host. (The file batch.log will include an error message in this case.) You must use Tecplot 360 EX in interactive mode to be able to open such data sets on Windows.

True unattended operation requires use of the SSH Tunneled or Direct Connection modes with SSH key pairs without passphrases or other interactive requirements. In this case, all platforms can access the data files in batch mode without difficulty.