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 have a server I can ssh into, and I am also running Ubuntu. How do I edit this remote file using any program I have installed on my local Ubuntu, without copying it to local, editing it, and copying it back?


share|improve this question
add comment

4 Answers

up vote 4 down vote accepted

If it's Ubuntu, then you probably have the full GNOME suite installed, along with GVFS.

So you can use Places → Connect to Server to connect that server's filesystem as if were a local one.

Or you can do this (which has the same effect):

gvfs-mount sftp://hostname.domain.tld/

Then all remote files will be easily accessible.

Unfortunately, not all programs directly support GVFS. You still can use this trick however, as GVFS is accessible by any program as a hidden directory ~/.gvfs/.

share|improve this answer
Super-awesome. I never knew about this, thanks for your help! –  ash May 26 '10 at 22:08
+1 for comment about hidden directory. –  liori May 27 '10 at 8:07
add comment

I use sshfs, a program that allows to mount a remote system accessible via ssh to a local folder.

Install it, create a mount point and execute:

sshfs user@host:remote_dir /path/to/mount_point

Now you can access the remote directory as a local one and you can use your text editor of choice. Moreover, as I said in this answer, I use sshfs also as an on-demand video/music streaming solution.

Example: if you want to mount the directory music of a user called pippo at host pluto in a folder ./pippo_music then execute:

sshfs pippo@pluto:music ./pippo_music

You can also mount the root of the pluto host with:

sshfs pippo@pluto:/ ./pippo_root

To automatize this process, you can add a row in fstab:

sshfs#pippo@pluto:/ /media/pippo_root fuse defaults 0 0
share|improve this answer
add comment

Tramp node in emacs will do this easily: http://www.emacswiki.org/emacs/TrampMode

share|improve this answer
Damn I wish vim had su:// –  grawity May 27 '10 at 12:01
add comment

vim can open files over SSH:

vim scp://myserver.com/path/to/file.txt
share|improve this answer
add comment

Your Answer


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.