help with text-append over SSH ?
peter at boosten.org
Fri Oct 12 05:12:30 PDT 2007
On Fri, October 12, 2007 01:49, Juri Mianovich wrote:
> I have an account on a system where I cannot log in
> over SSH, but I _can_ run a limited set of commands remotely, over SSH. (I
> am in a jail of some sorts).
> I want to append the contents of a local text file to
> the contents of a remote text file, over SSH.
> Normally, I would do this locally with:
> cat file1 >> file2
> But again, file2 is remote, and I can't log in
> there... I have access to the 'echo' command and the 'dd' command (among
> others) on the remote host ... so for instance, I can do things like this:
Just did some testing and this should work:
cat localtext | ssh remote "cat >> remotetext"
More information about the freebsd-questions