How to copy a file without using scp inside an ssh session?

I have logged on to a system with ssh and there is no scp present on both the systems. How to copy a file without using the scp program.


To send a file:

cat file | ssh ajw@dogmatix "cat > remote"

Or:

ssh ajw@dogmatix "cat > remote" < file

To receive a file:

ssh ajw@dogmatix "cat remote" > copy

Try this:

cat myfile.txt | ssh me@otherhost 'cat - > myfile.txt'