I just have a little question... I have a script in which I would like it to SSH to a server, then perform operations on that server.
Now, when I simply performed (in the script) 'ssh backups' or 'ssh xxx.xxx.xxx.xxx, it seemed to hang, I suppose because the script was waiting for the SSH session to end before proceeding to the next instruction. Now, I know that I could simply do 'ssh backups <command>', but what if the command requires some sort of human interaction? Say, I wanted to change a password or something... 'ssh backups passwd ron'. How on earth would I do that? I have heard about expect, but have no idea how to use it, or how to incorporate it into my script. By the way, I am writing a script to do various admin tasks on some new systems I am putting together. I'm not changing passwords, but that was the first example to pop into my head that required some interaction... I just figured that many things could be automated (such as adding installation sources, adding groups, etc.) so that I don't need to do each one individually. I can just plug the newly built box into my network, install Linux, then run a script to do some things that I do to all of my machines...