Question: My setup is a Qwest PK5000 router with a Linksys router running Tomato.

I have DMZ pointed towards my router. (The server is on the tomato router).

I tried my applications that open up sockets and Utorrent (port 6883)
and I ended having to do advanced port forwarding and forward specific ports in addition to having DMZ on my router.

The problem is that I cannot connect to perforce when on another machine on the LAN or off.
Any ideas? :)

Thanks!

Answer: 
I don't think scp alone can do what you ask. You should investigate rsync instead.

I use it for backups with a filter to exclude files with names that don't work on NTFS volumes

```
# the exclude is to filter out files with invalid names on NTFS
/usr/bin/rsync -rgqoxD --delete --exclude='*[:\?]*' /home/andrewr/src /filer001/syncd/src

```

you can also pass it the name of a file that contains the files to exclude (`--exclude-from=file`)

**Edit**: Here's a sample command line that works for your example:

```
cd src; find . -type f -name "*.htm" | rsync -av --files-from=- . host:dir

```
If you already have pre-shared ssh keys, you could first create all the remote directories in the following way:

```
# get all directories in this tree
for DIR in `find . -type d`
    do
        # create remote directory
        ssh user@host mkdir -p /path/to/start/$DIR
        # copy *only* *.htm files
        scp $DIR/*.htm user@host:/path/to/start/$DIR
    done

```

I think that's about what you're looking for.