next previous contents
Next: Startup file modifications Previous: Setting Up Your Environment

Configuring ssh

What is ssh?

ssh stands for secure shell. It is a secure way to login into other machines.

You should never use TELNET again if SSH is available (in fact I don't think you can use telnet on our network)

If ssh is not available on your machine or the one you are trying to access, you should contact the appropriate system administrator.

How to use ssh

The implementation of MPI that is installed uses ssh to startup your parallel processes on remote machines. By default, ssh prompts you for your password on the remote machine. Go ahead, try this now.
For example, type ssh sun1 or ssh pc01

If you have never used ssh to connect with the machine, you may be asked about an authentication key. It is okay to type "yes" at this prompt. This will only happen the first time you use ssh to connect to that machine. After the authentication key prompt (if any), ssh should prompt you for your password on that machine.

So, this is great because now we can access our accounts on other machines in a secure way. Except that for a parallel program that is going to use three machines, you'll get prompted for the passwords to each of those machines! And this will happen each time you execute the parallel program! Bummer, huh? But, read on!!

Bypassing the password prompt

It is possible to configure ssh to bypass the password prompt each time. To do this, you need to create a "key" for ssh to use. So perform the following steps. If you can already ssh around the EE network without being prompted for a password you may be able to skip this. If you have any problems running the getmachines.sh script you should check that his step has been completed.
  1. Type

    ssh-keygen -t rsa

  2. You will be prompted about what file to save the key in. Just accept the default (it should be "id_rsa") by pressing ENTER.
  3. You will be prompted about a passphrase, just hit ENTER for no passphrase.
  4. Just hit ENTER again for the passphrase confirmation.
  5. Add the public key just generated to your list of authorized keys by typing:

    cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

  6. If you don't already have an authorized_keys file to append to, just use one  >   in the command above. You will know this file doesn't exist if the first cat command gives you an error saying the file was not found or that there is no such file or directory
  7. Now do this for the RSA1 key (required by my getmachines.sh script) as well as the DSA key for good measure

    cd ~/.ssh ssh-keygen -t rsa1
    ssh-keygen -t dsa
    cat identity.pub id_dsa.pub >> authorized_keys