[TxMt] Edit remote file via SSH

Jeremy Wilkins jeremy at ibexinternet.co.uk
Tue Jan 17 10:57:14 UTC 2006


Cyberduck FTP can connect to an sftp server and open files in a text  
editor (textmates one of the options). When you save the file in  
textmate, it then automatically uploads back to the server.

Jeremy

On 17 Jan 2006, at 10:46, Simon Dorfman wrote:

> 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.
>
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>

---
Jeremy Wilkins
Ibex Internet Ltd

Parkside Business Park
Parkside Rd.
Kendal
Cumbria
LA9 7EN

Tel: 0845 226 8342
Fax: 08718 729374

http://www.ibexinternet.co.uk/







More information about the textmate mailing list