Using ssh X11 forwarding with IBM Spectrum LSF
For X-enabled applications to function as desired, the X connection must be tunneled over ssh, which is the secure method.
Before you begin
- ssh is installed on all LSF hosts (both submission and execution hosts).
- The client desktop connects to the LSF host with ssh X11 forwarding enabled.
- The X Server is installed on the local desktop host.
- Both local desktop hosts and the LSF submission hosts are configured properly for ssh X11 forwarding.
- ssh X11 forwarding works outside LSF, which means that when you use ssh to log in to the submission host from the display host, and use ssh -X to launch an X application to any execution host in the cluster, you should see the X application is displayed on the display host.
- The user’s $HOME/.cshrc, $HOME/.profile, and the user’s job script do not attempt to set the DISPLAYenvironment variable.
About this task
On X11 (X Window System), an X-enabled client application can run on one host while its GUI displays on another host, typically in the terminal on which the user is logged in.
Traditionally, you use the host-based access control provided by the X server, connecting to the remote machine using telnet or rsh and directing clients to connect to the server by setting the DISPLAY environment variable, but this method is not secure.
Access to an LSF cluster is most commonly restricted to ssh, with telnet and rsh disabled. For X-enabled applications to function as desired, the X connection must be tunneled over ssh. This is considered a secure method.
This topic describes a typical scenario for a remote user who wants to log in to the cluster and run an X-enabled job through LSF.
- Connect to your corporate network with VPN, if required.
- Make sure that the X display server is running on your local machine.
Set the DISPLAY environment variable to the appropriate value.
Connect to the cluster by using ssh.
ssh -Y username@remote_hostname_or_ip_address
Enter your password when prompted.
The ssh session displays the prompt for the remote machine.
The ssh server automatically sets the DISPLAY environment variable, typically to a value like localhost:10.0, so that clients connect to a proxy X11 display on the remote host from which the X11 protocol is forwarded over ssh to your X server. If your login scripts change DISPLAY to another value, this breaks X11 forwarding.
Set your LSF
- For csh or tcsh:
- For sh, ksh, or
- For csh or tcsh:
Submit your job using ssh X11 forwarding.
bsub -XK myXapp
You might be prompted for your ssh password.After submitting your job and entering your ssh password, if prompted, the GUI of your X application appears on your local display.