Tuesday, July 21, 2020

How To Mount Remote Directories over SSH via SSHFS on UbuntU 20.04 LTS

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

SSHFS (Secure Shell FileSystem), is a tool that allows users to securely access remote filesystems over the SSH protocol.

Github - https://github.com/libfuse/sshfs

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Testing Environment:

Ubuntu 20.04 LTS                     Hostname - www.yourdomain.com  - ip Address - 192.168.1.20

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

apt update ; apt install -y build-essential net-tools curl git software-properties-common


apt update ; apt install openssh-client sshfs -y

ssh ubuntu@192.168.1.50                              - SSH Server Detail- Ubuntu 18.04.LTS /192.168.1.50

mkdir $HOME/sshfs

sshfs [user@]host:[remote_directory] mountpoint [options]

sshfs ubuntu@192.168.1.50:/home/ubuntu $HOME/sshfs   - SSH Server Detail- Ubuntu 18.04.LTS /192.168.1.50

df -hT


Unmount -

cd && fusermount -u $HOME/sshfs

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment