CentOS Stream 9
Sponsored Link

OpenSSH : Use SSHFS
2022/01/07
 
It's possible to mount filesystem on another Host via SSH to use SSHFS.
[1] Install fuse-sshfs.
# install from EPEL

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

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

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

Filesystem                       Type        Size  Used Avail Use% Mounted on
devtmpfs                         devtmpfs    1.8G     0  1.8G   0% /dev
tmpfs                            tmpfs       1.9G     0  1.9G   0% /dev/shm
tmpfs                            tmpfs       745M  8.6M  737M   2% /run
/dev/mapper/cs-root              xfs          26G  1.8G   25G   7% /
/dev/vda1                        xfs        1014M  374M  641M  37% /boot
tmpfs                            tmpfs       373M     0  373M   0% /run/user/0
node01.srv.world:/home/cent/work fuse.sshfs   26G  1.8G   25G   7% /home/cent/sshmnt
# just mounted

# for unmount, do like follows
# possible to use [umount] command, too

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