Assume that your host computer is A, the other one that needs to login via SSH is B.
First, generate keys.
Run this command in both A and B:
ssh-keygen
Then exchange public keys.
Create a file named authorized_keys in ~/.ssh in B. Open ~/.ssh/id_rsa.pub in A and copy its content to ~/.ssh/authorized_keys in B.
Create a file named authorized_keys in ~/.ssh in A. Open ~/.ssh/id_rsa.pub in B and copy its content to ~/.ssh/authorized_keys in A.
Now you can get rid of password.