SSH on Windows

On Windows, VisIt uses its own qtssh.exe program that brings up the password window, if necessary. The qtssh.exe program is a simple ssh program based on Putty that includes VisIt's Qt-based password window and uses it to gather a user's password in the event that a password to a remote computer is required. VisIt provides qtssh.exe because:

  • VisIt needs an ssh program and most Windows systems do not have one since ssh programs are often 3rd party software that users must purchase.
  • VisIt needs ssh to open the VisIt password window if the user needs to enter a password.

Passwordless SSH

VisIt's ssh is based on PuTTY so it is compatible with PuTTY's pageant program. Pageant is an ssh key caching program that PuTTY programs can query for authentication purposes. Once you run pageant and load it with the public key for the remote computer you with to access, VisIt will be able to connect to that remote computer without entering a password.

See Configuring PuTTY for passwordless SSH access for the steps involved in setting up passwordless access.

Diagnosing problems

On other platforms, VisIt opens a pty and runs the system-installed ssh. The pty file descriptor is read and used to determine whether the password window needs to be shown within VisIt. Failures to connect are also reliably detected.

On Windows, VisIt uses qtssh.exe but there is no mechanism to report failure of qtssh.exe back to VisIt. This means that if qtssh.exe is unable to connect to the remote computer, VisIt will not receive any indication of that failure. In that event, you can cancel the connection using VisIt's Connection progress dialog.

In the event of a failure to connect, it can be important to just evaluate your computer's ability to connect to a remote computer, outside of VisIt. This is an important point regardless of the platform that you use to run VisIt. On Windows, you can run qtssh.exe directly to connect to the remote computer and run a command on it. For example, you might do the following from the Windows command line shell:

cd "C:\Program Files\LLNL\VisIt 2.5.0"
qtssh.exe -l username remotehost ls -la

The above example uses qtssh.exe to run the ls -la command to list directory contents on the remotehost computer using your remote username. Of course, in trying this example, you would replace remotehost with the name of the remote computer and you would replace username with your login name on the remote computer.


An indication of an error in qtssh causing in an incomplete $PATH environment variable when attempting to open a remote host in VisIt results in the main VisIt window saying:

bash: visit: command not found

This error can be confirmed using the following command from the Windows shell:

cd "C:\Program Files\LLNL\VisIt 2.5.0"
qtssh.exe -l username remotehost echo $PATH

If the path to the VisIt "bin/" directory is not present but is included when you ssh to the machine normally, this indicates that qtssh.exe has not properly loaded the the startup scripts correctly on the remote computer. Changing the ssh used to Cygwin's version of ssh can correct this problem, though it requires entering the ssh password in a console instead of a password dialog.

Overriding qtssh.exe with your own ssh

If you have managed to set up passwordless ssh on Windows using your own ssh then you might be able to coax VisIt to use your ssh by editing some VisIt registry keys. VisIt creates a VISIT<ver> registry key in HKEY_CLASSES_ROOT and under that, it adds some data values. You can edit the Windows registry using regedit. You could add an SSH data value that points to the path for your ssh application. You could also set SSHARGS to pass any relevant arguments to your ssh program.

The registry keys are read when VisIt is launched and are used to set environment variables VISITSSH and VISITSSHARGS that VisIt uses to determine the name of the ssh program that it should use. You could probably also just set those environment variables accordingly in the System control panel if you don't want to add registry settings for VisIt to read.

Of course, this all assumes that your ssh program accepts this style of ssh arguments: ssh -p port -l username host -R <portforwarding info> remoteprogram args. If your ssh does not accept those arguments, you could always create a batch script that maps the ssh arguments that VisIt provides into arguments that your ssh will understand.

Cygwin SSH

You can use regedit to tell VisIt to use Cygwin's SSH program.

  • NOTE: With VisIt 2.5.0 and earlier, we've discovered that Cygwin's ssh.exe is significantly faster than qtssh.exe (up to 10x). If you notice long delays in between processing the data and plotting it in the viewer window, switching to Cygwin's ssh.exe will improve transmission speed.

UsingCygwinSSH.png

  1. Open regedit. You can type that name into the Start Menu's Search field.
  2. Search for the VISIT2.5.0 key. If you use a different version of VisIt, replace the 2.5.0 with the version number that you use.
  3. Add a new string data value called SSH. Set the value to C:\cygwin\bin\ssh.exe.

The next time you run VisIt, Cygwin's SSH program will be used to connect to remote computers. This means that instead of the qtssh dialog, you will enter your password directly into a new Cygwin console window.

PuTTY plink

You can use regedit to tell VisIt to use PuTTY's plink.exe program.

  • NOTE: With VisIt 2.5.0 and earlier, we've discovered that PuTTY's plink.exe is significantly faster than qtssh.exe. We will be updating qtssh to use new plink.exe internals but in the meantime, you can use plink.exe directly.

UsingPuTTYSSH.png

  1. Open regedit. You can type that name into the Start Menu's Search field.
  2. Search for the VISIT2.5.0 key. If you use a different version of VisIt, replace the 2.5.0 with the version number that you use.
  3. Add a new string data value called SSH. Set the value to C:\PuTTY\plink.exe. Supply an alternate path to plink.exe if you have it installed elsewhere.
  4. Add a new string data value called SSHARGS. Set the value to -ssh to tell plink.exe to use the SSH protocol.

The next time you run VisIt, the plink.exe SSH program will be used to connect to remote computers. This means that instead of the qtssh dialog, you will enter your password directly into a new console window.