OpenSSH : Use SSHFS2024/04/26 |
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, [ubuntu] 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
tmpfs tmpfs 392M 1.1M 391M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4 28G 6.1G 20G 24% /
tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/vda2 ext4 2.0G 95M 1.7G 6% /boot
tmpfs tmpfs 392M 12K 392M 1% /run/user/0
node01.srv.world:/home/ubuntu/work fuse.sshfs 28G 6.1G 20G 24% /home/ubuntu/sshmnt
# mounted
ubuntu@dlp:~$ ll ~/sshmnt total 24 drwxrwxr-x 1 ubuntu ubuntu 4096 Apr 26 07:35 ./ drwxr-x--- 5 ubuntu ubuntu 4096 Apr 26 07:35 ../ -rw-r--r-- 1 ubuntu ubuntu 12813 Apr 26 07:35 testfile.txt # for unmount, do like follows ubuntu@dlp:~$ fusermount -u ~/sshmnt
|
Sponsored Link |