SSH login without password by using RSA keys

You have 2 machines, MachineA and MachineB.

MachineA
From your machine (another machine like Windows)

# ssh user1@MachineA

Input MachineA password for user1

If you haven't already genarated the ssh keys on Machine A
# ssh-keygen -t rsa

Then copy the ssh public key to Machine B
# ssh-copy-id -i ~/.ssh/id_rsa.pub user1@MachineB
Input MachineB password for user1

Now you can access MachineB with out password for the user user1
From MachineA
# ssh MachineB
No password


Do the same above steps to ssh from MachineB to MachineA without password

MachineB
From your machine

# ssh user1@MachineB
Input MachineB password for user1

If you haven't already genarated the ssh keys on Machine A
# ssh-keygen -t rsa

Then copy the ssh public key to Machine A
# ssh-copy-id -i ~/.ssh/id_rsa.pub user1@MachineA
Input MachineA password for user1

Now you can access MachineA with out password for the user user1
From MachineB
# ssh MachineA
No password

Loading