# Configuring `ssh` for GenBank Alignments

Due to the fact that `rsh` does not return the exit code of the remote process, `ssh` is used to run remote processes. In order for this to run unattended, `ssh` must be configured to run without prompting for a password. Authentication of `ssh` with `.rhosts` is not enabled at UCSC, so setting up a no passphrase key is the easiest way to achieve this.

1. Generate a key without a passphrase.

             ssh-keygen -t dsa -f ~/.ssh/nokey_dsa -N ''

2. Copy the contents on `.ssh/nokey_dsa.pub` to `.ssh/authorized_keys`.
3. Modify `.ssh/config` to specify using this identity file:

             Host *
                     IdentityFile ~/.ssh/nokey_dsa
                     IdentityFile ~/.ssh/id_dsa

4. Verify that you can ssh from `eieio` to `kk` and the iservers. If you are using `ssh-agent`, exit it before testing.

             foreach h (kk kkr1u00 kkr2u00 kkr3u00 kkr4u00 kkr5u00 kkr6u00 kkr7u00 kkr8u00)
                ssh $h uname -a
             end

5. If you have never ssh-ed to a machine before, you will be prompted the first time to add it to your ~/.ssh/known_hosts file. If you have ssh-ed to a machine, but the host key has changed (often happens on an OS update), then you must edit ~/.ssh/known_hosts to remove the remote host entry, then repeat the ssh to add the host under the new host key. Don't start the alignments until you can ssh to kk and the iservers without being prompted.
6. If you have started an alignment and discover that the `ssh` is not working correctly, fix the problem and restart `gbAlignStep` process by adding the `-continue=copy` option. This restarts that process at the point of copying the files to the `iservers`. All other options will be the same.