OpenSSH : Use SSHFS2020/04/27 |
It's possible to mount filesystem on another Host via SSH to use SSHFS.
|
|
[1] | Install fuse-sshfs. |
root@dlp:~# apt -y install sshfs
|
[2] | It's possible to use by any user. For example, [cent] user mount [/home/ubuntu/work] on [node01.srv.world] to local [~/sshmnt]. |
ubuntu@dlp:~$
mkdir ~/sshmnt
# mount with SSHFS ubuntu@dlp:~$ sshfs node01.srv.world:/home/ubuntu/work ~/sshmnt ubuntu@node01.srv.world's password: # password of the user df -hT
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs tmpfs 394M 1.1M 393M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4 3.9G 2.1G 1.7G 56% /
tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/loop0 squashfs 55M 55M 0 100% /snap/core18/1705
/dev/vda2 ext4 976M 103M 806M 12% /boot
/dev/loop1 squashfs 69M 69M 0 100% /snap/lxd/14804
/dev/loop2 squashfs 28M 28M 0 100% /snap/snapd/7264
tmpfs tmpfs 394M 0 394M 0% /run/user/0
node01.srv.world:/home/ubuntu/work fuse.sshfs 3.9G 2.1G 1.7G 56% /home/ubuntu/sshmnt
# just mounted
# for unmount, do like follows ubuntu@dlp:~$ fusermount -u ~/sshmnt
|
Sponsored Link |