Shell Script with ssh & scp
I want to use a shell script to ssh onto a remote machine and tar some files and copy them to my local machine. I already have it set up to log me in without a password prompt.
The problem is that once I am logged into the remote machine, the script stops running (or fails to continue running there). When I manually close the ssh connection, the script continues on (with errors now of course). I assume the script is waiting for the ssh program to end before continuing on with the script.
Is there a way to run a local script and have it do the commands for me once I'm logged into a remote system with ssh?