Skip to content

Use sshfs to edit remote files

  • by

As the new improved cross platform version of Sublime Text 2 has been released. (go and download it as fast as humanly possible )
I thought it might be nice to edit my remote files over ssh as if they were local files. How does one do that, one asks..

$ sudo apt-get install sshfs

This will also install fuse-utils and libfuse2, which are required.

Now, create a local directory where you want the files mounted. Create a directory and make yourself the owner of the directory:

$ sudo mkdir /media/dir-name
$ sudo chown your-username /media/dir-name

Add yourself to the fuse group:

$ sudo adduser your-username fuse

Then mount the remote directory to your local directory:

$ sshfs root@example.com:/stuff /media/home-pc

Where “/stuff” is the folder on the computer with the domain name “example.com”, which I want to mount and access on my local computer at the location /media/home-pc.

To unmount the directory once your work is done, use the command:

$ fusermount -u /media/home-pc

Leave a Reply