CentOS Stream 10
Sponsored Link

OpenSSH : Use SSHFS2024/12/19

 

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

Enter passphrase for key '/home/cent/.ssh/id_ed25519':
[cent@dlp ~]$
df -hT

Filesystem                       Type        Size  Used Avail Use% Mounted on
/dev/mapper/cs-root              xfs          26G  2.5G   24G  10% /
devtmpfs                         devtmpfs    4.0M     0  4.0M   0% /dev
tmpfs                            tmpfs       2.0G     0  2.0G   0% /dev/shm
tmpfs                            tmpfs       782M  8.6M  773M   2% /run
tmpfs                            tmpfs       1.0M     0  1.0M   0% /run/credentials/systemd-journald.service
/dev/vda2                        xfs         960M  278M  683M  29% /boot
tmpfs                            tmpfs       1.0M     0  1.0M   0% /run/credentials/serial-getty@ttyS0.service
tmpfs                            tmpfs       1.0M     0  1.0M   0% /run/credentials/getty@tty1.service
tmpfs                            tmpfs       391M   12K  391M   1% /run/user/0
node01.srv.world:/home/cent/work fuse.sshfs   26G  2.4G   24G   9% /home/cent/sshmnt
# just mounted

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

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