Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use a linux machine at work and a mac at home. I can ssh from my machine at home to my work machine. But the only editor that I have access to on the command line then is vi, which I don't like.

Is there a way to use gedit on my mac to edit files remotely over an ssh connection?

This page says that it can be done, but I think that it assumes that you are using gedit on ubuntu. On my mac (os 10.5.8) I don't have the "bookmark" option when I click "connect to server".

http://thecodecentral.com/2010/04/02/use-gedit-as-remote-file-editor-via-ftp-and-ssh-ubuntu/comment-page-1#comment-50558

share|improve this question

3 Answers 3

CyberDuck will allow you to edit files over SSH using the Mac text editor of your choice. I recommend TextWrangler.

share|improve this answer

Use the -X option when you ssh into your linux machine. If you haven't already installed X11, it's available as an optional install on your OS X install disc. With X11 installed, 'ssh -X user@host' starts X11 and you're ready to use gedit.

Alternatively, you can use Macfusion to mount your linux machine, through ssh, as a file system. You can then use an OS X text editor to edit files on the remote machine.

share|improve this answer
    
Depending on your version of OS X you may need to reinstall X11. I had to on Leopard. –  aqua Feb 4 '11 at 4:50
1  
Alternatively, you can use TextWrangler to edit files directly over SSH. –  romainl Feb 4 '11 at 10:33
    
+1 for ssh -X. I used that all the time at university. With Leopard and Snow Leopard, I didn't have to reinstall X - it "just worked". –  CajunLuke Feb 7 '11 at 22:32
2  
gedit via x11-forwarding? the horror ... sshfs is the only solution that makes any sense. –  akira Feb 7 '11 at 23:06
    
Thanks, @romainl, that's actually the best solution IMHO. I've been using TextWrangler for 3 years and never noticed it can do that. –  noamtm Jul 9 '13 at 21:39

Gedit uses gvfs, a virtual filesystem layer which allow him to access files through different protocols, including sftp (which is very probably available if ssh is available). So you're likely already able to use it to edit your remote files with no need to install anything. Just type sftp://youserver/ in the open dialog.

You can also use fuse + sshfs to mount the distant file hierarchy to a local mount point, thus be able to use any application to edit any file. An easy way to do this seems to be through MacFusion.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.