Mount a directory over SSH using SSHFS
With SSHFS, you can mount a remote directory over SSH.
A convenient way to access your server’s files is to use SSHFS. With this tool, you can mount a directory from a server into the local filesystem over SSH. It can be handy, for example, if you’re doing web development and need to edit files.
Start by downloading and installing SSHFS:
sudo apt-get install sshfsCreate a directory where you want to mount the remote server's file:
mkdir ~/sshfsmountdirectoryNow, let's mount the remote directory from the server:
sshfs exampleuser@remoteip:/home/user/svn ~/sshfsmountdirectoryAll commands may need to be adjusted to include your username, your directory names, and so on.
Now you’re free to edit the files and see how they change directly on the server.
Unmounting the remote directory
To unmount the remote directory, run:
fusermount3 -u ~/sshfsmountdirectoryLast updated
Was this helpful?