This method applies to OpenSSH using protocol version 2. I have also used this with the original ssh, but don't have notes about the steps involved. I have had OpenSSH and ssh operate with one another to perform automatic authentication, but have no details of how I did that!
This process involves two machines:
ssh-keygen -t dsa
to generate the public and private keys, using the DSA algorithm. I used all the default values, and no pass phrase. This is less secure than using a pass phrase, but is more convenient. Your call as to the risk/benefit to you. [If you use a pass phrase, you will be prompted for it each time you use ssh or scp which does rather negate the effect of automatic login. However, it does mean that compromise of your password on the client, or somebody with the root password (administrator access on Windows), does not gain access to other machines using your ID.]
The above creates a pair of files in the ~user1/.ssh directory. These are the public (id_dsa.pub) and private (id_dsa) keys which ssh uses for authentication. The public key needs to be replicated to all servers where you wish to login. The private key is used on the client machine only and should not be copied around. It must be kept private, and to enforce this, ssh will refuse to use it unless it is readable (or readable and writable) only by the owner (i.e. mode 400 or 600). The owner of the file must be user1.
cat id_dsa.pub >> ~user1/.ssh/authorized_keys2
chmod 644 ~user1/.ssh/authorized_keys2
Note that the ~user1/.ssh/authorized_keys2 file consists of very long lines, one line per client machine configured to automatically login to this machine. Using a text editor with line and/or word wrap will split these long lines, and make the file contents useless!
And that's it.
ssh user2@server.example.domain
Adding user1's public key to the ~user2/.ssh/authorized_keys2 file on server.example.domain allows user1 to login on the remote machine as user2 without being prompted for a password.