SSH login without password by using RSA keys

You have 2 machines, MachineA and MachineB.

MachineA
From your machine

# ssh user1@MachineA
Input MachineA password for user1
# ssh-keygen -t rsa
# 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 to ssh from MachineB to MachineA without password

MachineB
From your machine

# ssh user1@MachineB
Input MachineB password for user1
# ssh-keygen -t rsa
# 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