Jump to content
  • Linux: Mount Remote Directories With SSHFS

    aum

    • 232 views
    • 2 minutes
     Share


    • 232 views
    • 2 minutes

    SSHFS mounts remote directories to a local machine using secure encryption, with a connection that is far more secure than your standard FTP.

     

    The Secure Shell (SSH) isn’t just about allowing you to remote into servers to tackle admin tasks. Thanks to this secure networking protocol, you can also mount remote directories with the help of the SSH File System (SSHF).

     

    SSHFS uses SFTP (SSH File Transfer Protocol) to mount remote directories to a local machine using secure encryption, which means the connection is far more secure than your standard FTP. As well, once a remote directory is mounted, it can be used as if it was on the local machine.

     

    Consider SSHFS to be a more secure way of creating network shares, the only difference is you have to have SSHFS installed on any machine that needs to connect to the share (whereas with Samba, you only have to have it installed on the machine hosting the share).

     

    Let’s walk through the process of getting SSHFS up and running, so you can securely mount remote directories to your local machine.


    What You’ll Need

     

    To make this work, you’ll need at least two Linux machines. These machines can be Ubuntu or Fedora-based, because SSHFS is found in the standard repositories for most Linux distributions. You’ll also need a user with sudo privileges.


    Installing SSHFS

     

    Since SSHFS is found in the standard repositories, the installation is quite simple. Log into the server (which will house the directory to share) and install SSHFS with one of the following commands:

     

    •     Ubuntu-based distributions – sudo apt-get install sshfs -y
    •     Fedora-based distributions – sudo dnf install fuse-sshfs -y
    •     Arch-based distributions – sudo pacman -S sshfs
    •     openSUSE-based distributions – sudo zypper -n in sshfs

     

    Next, log into your local machine and install the package as well.

     

    Source


    User Feedback

    Recommended Comments

    There are no comments to display.



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...