I want to run the same set of Unix commands on multiple machines. I am aware of ssh and something like the below. I want to write a shell script to do this. I have access to bash and ksh and I'm on Linux Red Hat 5.
ssh root@ip "echo \$HOME"
However, I have 2 questions:
- I keep getting prompted for a password. How can I have it not prompt me and enter the password automatically?
- How can I execute multiple commands?