How are the machines password protected? Do you usually connect via telnet? If you use telnet, you could try the Expect Module (what was the exact name for that???), which can handle interactive sessions. Or, if you're using ssh or similar, you could generate host keys on the remote machine so you don't need to enter a password.