**My goal:**

having a shellscript for a cronjob (on MacOSX Snow Leopard) that connects to a Debian machine with ssh (public/private key login), executes a `tar` command and downloads the tarred file afterwards.

**My problem:**

The login works, also the execution of some commands. But how can I download a file back to the local machine?

**This is what I have so far:**

This is the content of the shell script so far:

```
#!/bin/bash
ssh user@remotehost << 'ENDSSH'
tar -C / -czf /home/user/stuff.tar.gz /home/user/stuff
ENDSSH

```