yes, i think you should do it like:

ssh [EMAIL PROTECTED] << EOF
cd /usr/local
echo "some new command" >> therefile
logout
exit 1
EOF

hope it helps
raymundo

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]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to