How to execute command in remote server without entering password?

Hi,

i want to run the command in remote server through ssh and every time when i run the script its asking to enter the password. I dnt want to enter the password, when i enter the ip address and directly the command shuld execute.

Script:

#!/bin/bash
echo "Enter Server IP Address:"
read b
scp /tmp/script.sh srom@$b:/tmp
ssh srom@$b chmod +x /tmp/script.sh
ssh srom@$b /tmp/script.sh

search in google for "password less ssh setup"

Check this out

ssh-keygen: password-less SSH login