you can have an ssh key on the remote server (using ssh-keygen) so that only that you can limit ony one computer to connect.. Then you wouldn't have to worry about the password. (btw I don't think storing the password in a script is a good idea.)
I am having the same problem. I need to connect to 3 machines using ssh then prompt for password then go to cd /file then start program then have the 3 machines logs come up. Can you help with this.