[TxMt] Edit remote file via SSH
Simon Dorfman
emaillists at simondorfman.com
Tue Jan 17 10:46:37 UTC 2006
On 1/10/06 3:20 PM, "John Johnson" <johnatl at mac.com> wrote:
> Believe it or not, this works:
>
> ssh mythtv at dell "cat ~/test_file" | mate | ssh mythtv at dell "cat
>> ~/test_file"
>
> So I created this script for you.
> I put this in /usr/local/bin/rmate (r for remote).
> Be sure and chmod a+x /usr/local/bin/rmate:
>
> #!/bin/sh
>
> HOST='most.often.used.host'
> USER='most.often.used.username'
> FILE=''
<snip>
If I understand it correctly, this script isn't very useful to me. The
problem is that I often ssh to my webserver from public wi-fi access points
which means I can't enter a hostname where my webserver can ssh back to my
laptop. Is there a way for the script to use the existing ssh connection to
copy the file?
Simon
P.S.- I did try running your script from my laptop for the heck of it and
got this error:
cp: illegal option -- a
I double checked the man pages for cp and saw that -a wasn't an option.
So I deleted the "-a " from your script and then it worked.
More information about the textmate
mailing list