This is a simple script to automatically setup password-less ssh login to remote Linux box. Note that this script uses a program to automate interactions with programs that expose a text terminal interface [Expect]
This code is taken from : Owner of this code
--prerequisites
Install expect too as below:
# sudo yum install expect
Supports on Linux platforms only with expect tool.