How to mount a remote folder in ubuntu

The main purpose of writing this article is to provide a step-by-step guide on how to mount remote Linux file system using SSHFS client over SSH.

This article is useful for those users and system administrators who want to mount remote file system on their local systems for whatever purposes. We have practically tested by installing SSHFS client on one of our Linux system and successfully mounted remote file systems.

Before we go further installation let’s understand about SSHFS and how it works.

Sshfs Mount Remote Linux Filesystem or Directory

What Is SSHFS?

SSHFS stands for (Secure SHell FileSystem) client that enable us to mount remote filesystem and interact with remote directories and files on a local machine using SSH File Transfer Protocol (SFTP).

SFTP is a secure file transfer protocol that provides file access, file transfer and file management features over Secure Shell protocol. Because SSH uses encryption while transferring files over the network from one computer to another computer and SSHFS comes with built-in FUSE (Filesystem in Userspace) kernel module that allows any non-privileged users to create their file system without modifying kernel code.

In this article, we will show you how to install and use SSHFS client on any Linux distribution to mount remote Linux filesystem or directory on a local Linux machine.

Step 1: Install SSHFS Client in Linux Systems

By default sshfs packages does not exists on all major Linux distributions, you need to enable epel repository under your Linux systems to install sshfs with the help of Yum command with their dependencies.

Step 2: Creating SSHFS Mount Directory

Once the sshfs package installed, you need to create a mount point directory where you will mount your remote file system. For example, we have created mount directory under /mnt/tecmint .

Step 3: Mounting Remote Filesystem with SSHFS

Once you have created your mount point directory, now run the following command as a root user to mount remote file system under /mnt/tecmint . In your case the mount directory would be anything.

The following command will mount remote directory called /home/tecmint under /mnt/tecmint in local system. (Don’t forget replace x.x.x.x with your IP Address and mount point).

If your Linux server is configured with SSH key based authorization, then you will need to specify the path to your public keys as shown in the following command.

Step 4: Verifying Remote Filesystem is Mounted

If you have run the above command successfully without any errors, you will see the list of remote files and directories mounted under /mnt/tecmint .

Step 5: Checking Mount Point with df -hT Command

If you run df -hT command you will see the remote file system mount point.

Sample Output

Step 6: Mounting Remote Filesystem Permanently

To mount remote filesystem permanently, you need to edit the file called /etc/fstab . To do, open the file with your favorite editor.

Go to the bottom of the file and add the following line to it and save the file and exit. The below entry mount remote server file system with default settings.

Make sure you’ve SSH Passwordless Login in place between servers to auto mount filesystem during system reboots..

If your server is configured with SSH key based authorization, then add this line:

Next, you need to update the fstab file to reflect the changes.

Step 7: Unmounting Remote Filesystem

To unmount remote filesystem, jun issue the following command it will unmount the remote file system.

That’s all for now, if you’re facing any difficulties or need any help in mounting remote file system, please contact us via comments and if you feel this article is much useful then share it with your friends.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

We are thankful for your never ending support.

If you are someone who needs to access remote folders like FTP, Samba, SSH or any other remote folders a lot then Ubuntu and many other Linux distributions have a built-in and simple way to mount them right in the file browser. Sure there are a lot of FTP and other clients to access these remote folders, but launching them and logging in each and every time is a bit clunky and time-consuming. So, if you want to be productive then mounting those remote folders right in Ubuntu is that way to go. Here is how you can do it.

Mount Remote Folders in Ubuntu

Mounting remote folders in Ubuntu is a pretty easy and straightforward. To start off, open up the File Browser using the shortcut on the Launcher or by searching for it in the Dash. Once opened, click on the option “Connect to Server” from the left navigation pane.

How to mount a remote folder in ubuntu

The above action will open the “Connect to Server” window. Here, enter your remote folder address and click on the connect button. In my case, I’m connecting to an SFTP server. So I entered the remote address as following.

Note: if you want to connect to remote folders that use, FTP, Samba, etc. then you need to change the address format accordingly. For instance, you can use ssh:// for SSH, smb:// for Samba, etc.

How to mount a remote folder in ubuntu

As soon as you click on the Connect button, Ubuntu may show you that it can’t verify the identity of the remote server or folder. Just click on the button “LogIn Anyway” to continue.

How to mount a remote folder in ubuntu

After clicking on the LogIn Anyway button, Ubuntu will ask for the Password, if any. Enter the password and click on the button “Connect.” By default, Ubuntu selects the checkbox “Remember password until logout.” If you log into this remote folder frequently then you might want to select the radio button “Remember forever” so that you don’t have to enter the password each and every time.

How to mount a remote folder in ubuntu

As soon as you click on the Connect button, you will be logged into the remote folder. You can access all the contents of the remote folder directly from Ubuntu file browser.

How to mount a remote folder in ubuntu

Also, if you are going to use this remote folder frequently then you can create a bookmark so that you can open the remote folder with just a click. To do that, right-click on the remote drive in the left pane and then select the option “Add Bookmark” and you are good to go.

How to mount a remote folder in ubuntu

That’s all there is to do and it is that simple to mount remote folders like FTP, SFTP, SSH, WebDEV, Samba, etc. directly in Ubuntu file manager.

Do comment below sharing your thoughts and experiences about using the above method to mount remote folders in Ubuntu.