sshfs指令可以通过ssh协议挂载远程主机上的目录,该软件需要手动安装。
sshfs 2.3的版本安装如下
wget http://sourceforge.net/projects/fuse/files/sshfs-fuse/2.3/sshfs-fuse-2.3.tar.gz/download
wget tar xf download cd download ./configure && make && make install #此时会报错如下 configure: error: Package requirements (fuse >= 2.3 glib-2.0 gthread-2.0) were not met: No package ‘fuse‘ found No package ‘glib-2.0‘ found No package ‘gthread-2.0‘ found 缺少包,fuse模块是sshfs使用的前提 解决方法如下: yum -y install fuse fuse-* glib2 glib2-* 简单使用如下: sshfs -o cache=yes,allow_other,password_stdin=123456 [email protected]:/root /mnt echo 123456 | sshfs -o cache=yes,allow_other,password_stdin [email protected]:/root /mnt
sshfs远程挂载
时间: 2024-10-24 04:59:05