Total de visualizações de página

terça-feira, 3 de maio de 2016

Mount with SSHFS


Mount with SSHFS
2015/10/20
 
It's possible to mount filesystem on another Host via SSH to use SSHFS.
[1]Install fuse-sshfs.
# install from EPEL

[root@dlp ~]# 
yum --enablerepo=epel -y install fuse-sshfs
[2]For example, mount /home/cent on another Host with "cent" user.
# create a directory for mount

[cent@dlp ~]$ 
mkdir ~/sshmnt
# mount with SSHFS

[cent@dlp ~]$ 
sshfs 10.0.0.31:/home/cent ~/sshmnt 

cent@10.0.0.31's password:     
# SSH password
[cent@dlp ~]$ 
df -hT 

Filesystem              Type        Size  Used Avail Use% Mounted on
/dev/mapper/centos-root xfs          27G  1.1G   26G   5% /
devtmpfs                devtmpfs    2.0G     0  2.0G   0% /dev
tmpfs                   tmpfs       2.0G     0  2.0G   0% /dev/shm
tmpfs                   tmpfs       2.0G  8.3M  2.0G   1% /run
tmpfs                   tmpfs       2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/vda1               xfs         497M  151M  347M  31% /boot
10.0.0.31:/home/cent    fuse.sshfs   27G  1.1G   26G   4% /home/cent/sshmnt
# just mounted
# for unmount, do like follows

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

Nenhum comentário:

Postar um comentário