Rocky_Linux_8
Sponsored Link

OpenSSH : Use SSHFS
2021/07/19
 
It's possible to mount filesystem on another Host via SSH to use SSHFS.
[1] Install fuse-sshfs.
# install from PowerTools (disabled by default)

[root@dlp ~]#
dnf --enablerepo=powertools -y install fuse-sshfs
[2] It's possible to use by common users.
For example, [rocky] user mount [/home/rocky/work] on [node01.srv.world] to local [~/sshmnt].
[rocky@dlp ~]$
mkdir ~/sshmnt
# mount with SSHFS

[rocky@dlp ~]$
sshfs node01.srv.world:/home/rocky/work ~/sshmnt

rocky@node01.srv.world's password:
[rocky@dlp ~]$
df -hT

Filesystem                        Type        Size  Used Avail Use% Mounted on
devtmpfs                          devtmpfs    1.9G     0  1.9G   0% /dev
tmpfs                             tmpfs       1.9G     0  1.9G   0% /dev/shm
tmpfs                             tmpfs       1.9G  8.5M  1.9G   1% /run
tmpfs                             tmpfs       1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/mapper/rl-root               xfs          26G  2.2G   24G   9% /
/dev/vda1                         xfs        1014M  201M  814M  20% /boot
tmpfs                             tmpfs       374M     0  374M   0% /run/user/0
node01.srv.world:/home/rocky/work fuse.sshfs   26G  2.1G   24G   9% /home/rocky/sshmnt
# just mounted

# for unmount, do like follows

[rocky@dlp ~]$
fusermount -u ~/sshmnt
Matched Content