Tunneling SubEthaEdit

Thanks to MacZOT, I have a free copy of SubEthaEdit coming my way. SubEthaEdit is an awesome editor for doing collaborative, realtime editing on a text document. That is, if you’re using a Mac. If you’re not, well you’ve got more serious problems.

Anyway, I was reading the blog at the Coding Monkey’s web site (the guys that make the editor) about how to run a SubEthaEdit server.

To forward SubEthaEdit traffic to a Mac OS X machine with Internet connection, we use redir. An example setup for redir would be “redir —lport 6942 —caddr <remoteipaddress> —cport 6942 -nredir —syslog”

That’s a great tip— and it helped me realize how I can use SubEthaEdit more often, even when working behind a firewall. In fact, two firewalls typically— my home router and the one running on OS X. To do this, we just need to use OpenSSH. Their ‘redir’ command translates to this SSH command (when run from your Mac’s terminal):

ssh user@server -g -R 6942:localhost:6942

And… that didn’t work. Well, after digging around a bit more, I realized that by default, SSH disables ‘-g’ (the gateway switch— allows public connections, not just local ones) when used in combination with ‘-R’ (forwarding a remote port to one on the local network). The option to enable it is (add to your server’s sshd_config file):

GatewayPorts yes

And with that, the ssh command works and I can share document URLs issued by SubEthaEdit (exchanging my machine name with my server’s name). This allows me to set up a document that I can share for editing/viewing to others on an as-needed basis. As a bonus, the sessions are secure since they’re run through SSH.


TrackBack URL for this entry:


zeigerpuppy said:

Hi There!

I am familiar with ssh tunneling, however the subethaedit way of things is still abit of a mystery to me.

Could you help me out... what I am trying to do is edit a local document (or one mounted locally from WebDAV) and share it with a collaborator.

She also has a mac and subethaedit but we are on completely different networks.
Is it possible for her to collaboratilvely edit the doc while I do all the ssh stuff??


This article was published on April 25, 2006 10:26 PM.

The article previously posted was Archive navigation drop down lists.

The next article is Daily history files for Bash.

Many more can be found on the home page or by looking through the archives.

Powered by Movable Type