UC San Diego SearchMenu

Configuring Secure Shell on a Desktop for Use with MATLAB Parallel Computing Toolbox

MATLAB has unique setup requirements for users with a Parallel Computing Toolbox on their Windows desktop, compared with other desktop platforms. A secure shell is required to access the TSCC MATLAB server, and this must be installed if not already available. For Linux and Mac OS X, the default system shell will suffice.

When using the TSCC-based toolbox and client, this desktop configuration is not required.

Configuring MATLAB for Use with a Desktop Client

To access the Distributed Computing server on TSCC from a desktop system (in other words, to use the Parallel Computing Toolbox with a client not installed on TSCC), you must have a secure shell installed on the desktop. The setup process is different for Windows and Linux/Mac <#unix>.

Windows Procedure

  1. Download and install PuTTY for Windows. You can download it from the PuTTY Download Page.
  2. Set the Windows PATH environment variable to the directory where the PuTTY executables are installed:
    1. Using the secondary mouse button, click the My Computer icon on the Desktop or in Windows Explorer
    2. Select Properties from the Context Menu; this brings up the System Properties dialog
    3. Click the Advanced System Settings tab for Vista and Windows 7, or Windows 8 or the Advanced tab for XP
    4. Click the Environment Variables button
    5. In the User Variables field, click on PATH and select Edit
    6. Add the PuTTY path to the existing path information
    image of Windows environment variables dialog
  3. Generate an ssh key with puttygen
    1. Click the Start button, then Click the Run button
    2. In the Run window, type puttygen and click OK
    3. Click on Generate and move the cursor around the Key field
    4. Copy the public key to your .ssh directory on the TSCC login node
    5. On TSCC, convert the public key to an openssh key by running:
      ssh-keygen -i -f public_key.in > public_key.out in your .ssh directory
    6. Add the converted public key to your ~/.ssh/authorized_keys file
    image of keygen dialog 
     image of putty configuration session dialog
  4. Create a PuTTY profile for TSCC
    1. Click the Start button, then Click the Run button
    2. In the Run window, type putty and click OK
    3. Enter <login>@tscc-login.sdsc.edu in the Host Name field where <login> is your TSCC login name
    4. Expand the Category tree on the left by clicking on the plus sign (+) next to SSH
    5. Click on Auth
    6. Click the Browse button and select the private key that you created
    7. Click on Session and enter <login>@tscc-login.sdsc.edu in the Saved Sessions field
    8. Click Save
    image of putty configuration auth dialog

Linux and Mac OS X Procedure

UNIX systems (Linux, Mac OS X, etc.) have native implementations of ssh and scp, so when using a desktop MATLAB client, the only requirements are:

  • The public key from the MATLAB client machine must be installed in your TSCC account's ~/.ssh/authorized_keys file.
  • You must have a public/private keypair established on TSCC.
    • You are prompted for this keypair the first time you log onto TSCC.
    • It must not require a password.
  • The line in the public key file on TSCC (id_rsa.pub) must also be present in the authorized_keys file.

If you do not have an ssh keypair on your desktop, you can generate one as follows:

  1. From the Mac/Linux command line, run ssh-keygen -t rsa
  2. Press the Enter (Return) key at the passphrase prompt (creating a passwordless keypair)
  3. This will create a file named id_rsa.pub in your .ssh directory
  4. Insert the contents of this file into ~/.ssh/authorized_keys on the TSCC login node

MATLAB Tutorial