OpenSSH : Use SSHFS

 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 any user.

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    3.8G     0  3.8G   0% /dev

tmpfs           tmpfs       3.9G     0  3.9G   0% /dev/shm

tmpfs           tmpfs       3.9G  8.5M  3.9G   1% /run

tmpfs           tmpfs       3.9G     0  3.9G   0% /sys/fs/cgroup

/dev/mapper/cl-root    xfs          26G  1.7G   25G   7% /

/dev/vda1   ext4   976M  254M  656M  28% /boot

tmpfs   tmpfs       782M     0  782M   0% /run/user/0

node01.srv.world:/home/cent/work fuse.sshfs   26G  1.7G   25G   7% /home/cent/sshmnt

# for unmount, do like follows

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

Comments

Popular posts from this blog

Java : Variables Declaring

Install DNF in RHEL/CentOS 7

SQL Self JOIN