1 / 7

How to Mount Remote Filesystem Or Directory in Linux

Sometimes you may need to mount remote filesystem in Linux. Here are the steps to do so. #Linux #Ubuntu #Redhat <br><br>Visit https://fedingo.com/how-to-mount-remote-filesystem-or-directory-in-linux/

Download Presentation

How to Mount Remote Filesystem Or Directory in Linux

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. How to Mount Remote Filesystem or Directory in Linux

  2. Install SSHFS Client in Linux First of all, open terminal and run the following command to install SSHFS on your local client system. # yum install sshfs # dnf install sshfs [On Fedora 22+ releases] $ sudo apt-get install sshfs [On Debian/Ubuntu based systems]

  3. Create Mount Directory Once SSHFS is installed, create a mount directory with the following command. # mkdir /mnt/test [RHEL/CentOS/Fedora] $ sudo mkdir /mnt/test [On Debian/Ubuntu based systems]

  4. Mount Remote Filesystem Mount the remote directory /home/test at local mount point /mnt/test. # sshfs user_name@x.x.x.x:/home/test/ /mnt/test [RHEL/CentOS/Fedora] $ sudo sshfs -o allow_other user_name@x.x.x.x:/home/test/ /mnt/test [Ubuntu/Debian] If you are using key-based authentication use following commands # sshfs -o IdentityFile=~/.ssh/id_rsa test@x.x.x.x:/home/test/ /mnt/test [RHEL/CentOS/Fedora] $ sudo sshfs -o allow_other,IdentityFile=~/.ssh/id_rsa tecmint@x.x.x.x:/home/test/ /mnt/test [Ubuntu/Debian]

  5. Verify Remote Filesystem Once the remote filesystem is mounted you can access its contents as if it were a local folder /mnt/test. # cd /mnt/tecmint # ls

  6. Mount Remote Filesystem Permanently If you want to permanently mount a remote filesystem, you need to make the following changes to /etc/fstab file. Open it in a text editor with the following command. # vi /etc/fstab [RHEL/CentOS/Fedora] $ sudo vi /etc/fstab [On Debian/Ubuntu based systems] Add the following line to the bottom of the file. sshfs#user_name@x.x.x.x:/home/test/ /mnt/test fuse.sshfs defaults 0 0 # mount -a [RHEL/CentOS/Fedora] $ sudo mount -a [On Debian/Ubuntu based systems]

  7. Thank You Visit for details https://fedingo.com/how-to-mount-remote-filesystem-or-directory-in-linux/

More Related