How to login remote server non-interactivly through shell script?

How to login remote server non-interactivly through shell script?
Some times we want to make non-interactivly connection on server through shell script so for this we required a ssh public private key mechanism. 
which is slightly tedious task user always require key for connecting the server.
There are a solution called “sshpass” which uses the user-password mechanism for non-interactive session.

Download the rpm file from below link
http://dl.fedoraproject.org/pub/epel/7/x86_64/s/sshpass-1.06-1.el7.x86_64.rpm

Install the rpm file on your working station .
and Now you can connect to the server with below command

sshpass -p ‘user password of remote server’ ssh user@ip

You can also use above syntax in your script .

Enjoy non-interactive session without ssh public-private key.