SSHFS: Difference between revisions

From XPUB & Lens-Based wiki
(Created page with "SSHFS (SSH Filesystem) is a filesystem client for mounting remote directories on your machine, using an SSH connection. By using it you can access, read, edit files from a r...")
 
 
(8 intermediate revisions by 3 users not shown)
Line 4: Line 4:
as long as you have an account in the remote machine.
as long as you have an account in the remote machine.


=Install=
===Install===
==on Debian/Ubuntu==
====on Debian/Ubuntu====
  sudo apt update
  sudo apt update
  sudo apt install sshfs
  sudo apt install sshfs


==on mac==
====on mac====
Use homebrew:
Use homebrew:
If homebrew is not installed run the installation command:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


Once brew is installed, run:
  brew cask install osxfuse
  brew cask install osxfuse
  brew install sshfs
  brew install sshfs


If homebrew is not installed, run the installation command:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


=Mounting the Remote File System with sshfs=
===Mounting the Remote File System with sshfs===
sshfs command essential parameters:  
sshfs command essential parameters:  
  sshfs user@host:remote_directory local_mount_directory   
  sshfs user@host:remote_directory local_mount_directory   


==How to mount:==
====How to mount:====
Create a directory in your local machine, to be use as a mount point
Create a directory in your local machine, to be use as a mount point
  mkdir ~/remote
  mkdir ~/remote
Line 32: Line 32:
That's it
That's it


==How to unmount==
====How to unmount====
To unmount the remote dir from the local directory we use the <code>umount</code> NOT '''unmount''', BUT '''umount'''
To unmount the remote dir from the local directory we use the <code>umount</code> NOT '''unmount''', BUT '''umount'''



Latest revision as of 13:09, 3 September 2024

SSHFS (SSH Filesystem) is a filesystem client for mounting remote directories on your machine, using an SSH connection.

By using it you can access, read, edit files from a remote machine on your local machine, as long as you have an account in the remote machine.

Install

on Debian/Ubuntu

sudo apt update
sudo apt install sshfs

on mac

Use homebrew:

brew cask install osxfuse
brew install sshfs

If homebrew is not installed, run the installation command:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Mounting the Remote File System with sshfs

sshfs command essential parameters:

sshfs user@host:remote_directory local_mount_directory  

How to mount:

Create a directory in your local machine, to be use as a mount point

mkdir ~/remote

Mount host remote directory onto the ~/remote directory

ssh user@host:/full/path/to/remote/dir ~/remote

That's it

How to unmount

To unmount the remote dir from the local directory we use the umount NOT unmount, BUT umount

umount ~/remote