Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Oct 2007 14:12:25 +0200 (CEST)
From:      "Peter Boosten" <peter@boosten.org>
To:        "Juri Mianovich" <juri_mian@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: help with text-append over SSH ?
Message-ID:  <61979.212.159.200.167.1192191145.squirrel@www.boosten.org>
In-Reply-To: <561095.99967.qm@web45614.mail.sp1.yahoo.com>
References:  <561095.99967.qm@web45614.mail.sp1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 (amon=
g
> others) on the remote host ... so for instance, I can do things like th=
is:
>

Just did some testing and this should work:

cat localtext | ssh remote "cat >> remotetext"

Peter
--=20
http://www.boosten.org




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61979.212.159.200.167.1192191145.squirrel>