Possible with sshpass.
Check if the server is installed with sshpass by running below command
If no path found, then install with
#yum install sshpass
if no luck, then download rpm and install it.
sshpass rpm download link:
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/sshpass-1.05-1.el6.x86_64.rpm
# rpm -ivh sshpass-1.05-1.el6.x86_64.rpm
# which sshpass
Now log onto server with password in single command which ignores user prompt for password
sshpass -p ‘leo$123′ ssh firstname.lastname@example.org
If we want to run any command on other server from one server to prevent log on to other server.
ssh email@example.com “netstat -tunlp”
Prompts for password
With password in a single command:
sshpass -p ‘leo$123′ ssh firstname.lastname@example.org “netstat -tunlp”