OpenSSH : Use SSHFS2023/12/19 |
It's possible to mount filesystem on another Host via SSH with SSHFS.
|
|
[1] | Install fuse-sshfs. |
root@dlp:~ #
pkg install -y fusefs-sshfs
root@dlp:~ #
vi /boot/loader.conf # add to last line fusefs_load="YES"
root@dlp:~ #
vi /etc/sysctl.conf # add to last line vfs.usermount=1 reboot
|
[2] | Try to use SSHFS with any user. For example, [freebsd] user mounts [/home/freebsd/work] on [node01.srv.world] to local [~/sshmnt]. |
freebsd@dlp:~ $
mkdir ~/sshmnt
# mount with SSHFS freebsd@dlp:~ $ sshfs node01.srv.world:/home/freebsd/work ~/sshmnt (freebsd@node01.srv.world) Password for freebsd@node01.srv.world: # password of the user df -hT /home/freebsd/sshmnt
Filesystem Type Size Used Avail Capacity Mounted on
node01.srv.world:/home/freebsd/work fusefs.sshfs 26G 212K 26G 0% /home/freebsd/sshmnt
# mounted
# for unmount, do like follows freebsd@dlp:~ $ umount ~/sshmnt
|
Sponsored Link |