1

I am accessing my server (Ubuntu based) from my local Ubuntu using terminal. I would like to open files on the server using my local application (for example, Sublime editor). Could anyone help me in this?

Zanna
  • 70,465
Rajeev Jayaswal
  • 231
  • 2
  • 8

1 Answers1

2

You can mount your Ubuntu server files to your local Ubuntu installation, and then edit those files with Sublime as if they were local.

The following assumes that you can SSH access to the Ubuntu server.

sudo apt-get install sshfs

This will install the sshfs package.

cd
mkdir ServerFiles/
sshfs myServerUsername@example.com:/home/myServerUsername/ ServerFiles/

Here you create an empty directory in your home folder and the sshfs command will connect it to your server's home directory.

You can now visit the ServerFiles/ directory with Sublime (or any other program) and you have direct access to your server files, locally!

To disconnect when you finish,

cd 
fusermount -u MYSERVERMOUNT/
user4124
  • 8,911
  • Is there no other way like export DISPLAY=:0 and open using local editor ? – Rajeev Jayaswal Mar 04 '17 at 10:14
  • With export DISPLAY... you would be running the GUI program on the server (you would need to install the ubuntu-desktop package on the server!). If your connection is not particularly fast, then it will not work very well. – user4124 Mar 04 '17 at 10:19