Use the Expect scripting langauge. It was designed for scripting interactive processes. Learn more at: http://expect.nist.gov/
Dave V. On Tue, 2003-02-11 at 17:28, David Simmons wrote: > We have a couple of servers that we want to push out periodic updates > to. We want to automate this as much as possible. > > We have password-less ssh working (thanks to the group for that!). So > using a shell script we can login in to a remote machine. But that is > all we can do. Once we login we are in a completely different shell > environment. My script stops executing at that point. Once I logout of > the remote server, my script continues running. > > Is it possible to continue feeding commands from the ssh shell script I > wrote to the remote machine? For example, if my script is something > like: > > ssh [EMAIL PROTECTED] > cd /usr/local > echo "some new command" >> therefile > logout > exit 1 > > How can I get everything past the ssh command to run on the remote > machine? Is it possible? > > Thanks, > > Dave Simmons > > > > -- > redhat-list mailing list > unsubscribe mailto:[EMAIL PROTECTED] > https://listman.redhat.com/mailman/listinfo/redhat-list -- David E Vehrs, System Engineer Aspen Systems [EMAIL PROTECTED] 3900 Youngfield Street Tel: +01 303 431 4606 Wheat Ridge CO 80033, USA Fax: +01 303 431 7196 http://www.aspsys.com -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list