Skip to main content

Linux: Mount Remote Filesystems with SSHFS (Step-by-Step Guide)

HardReset.InfoJanuary 1, 20269 min29 views
6 connections·9 entities in this video→

Prerequisites: SSH Setup

  • πŸ’‘ SSH service must be installed and running to use SSHFS.
  • πŸ”‘ Check SSH status with sudo systemctl status ssh.
  • πŸ› οΈ Install OpenSSH Server if missing using sudo apt install openssh-server.
  • βœ… Enable and start the SSH service with sudo systemctl enable --now ssh.

Installing SSHFS

  • πŸš€ The sshfs package is required for mounting remote filesystems.
  • πŸ“¦ Install it using the command sudo apt install sshfs.
  • πŸ” Verify the installation by checking the version: sshfs --version.

Network Configuration and IP Address

  • 🌐 Knowing your IP address is crucial for connecting to the remote system.
  • ⚠️ If using a Virtual Machine, ensure the network adapter is set to Bridged Adapter mode, not NAT.
  • πŸ“ˆ An IP address starting with 192.168.x.x (or similar local network range) typically indicates a bridged adapter.

Preparing Directories

  • πŸ“‚ Create a remote directory on the source system (e.g., /home/user/remote_source).
  • πŸ“ Add a test file (e.g., test.txt) to the remote directory to verify mounting.
  • πŸ“ Create a local mount point directory on the client system (e.g., /home/user/remote_mount).

Mounting and Unmounting

  • πŸ”— Use the sshfs command with the syntax: sshfs user@IP:/path/to/remote/source /path/to/local/mount.
  • πŸ”‘ You will be prompted for the remote user's password.
  • 🧐 Verify the mount by listing the contents of the local mount point; it should contain the remote files.
  • πŸ”“ To unmount, use the command fusermount -u /path/to/local/mount.
Knowledge graph9 entities Β· 6 connections

How they connect

An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.

Hover Β· drag to explore
9 entities
Chapters4 moments

Key Moments

Transcript35 segments

Full Transcript

Topics13 themes

What’s Discussed

SSHFSLinuxMount Remote FilesystemSSHOpenSSH ServerUbuntuDebianIP AddressBridged AdapterVirtual MachineTerminal CommandsMount PointUnmount
Smart Objects9 Β· 6 links
ConceptsΒ· 2
ProductsΒ· 7