sshfs命令挂载远程目录(debian centos)
2015-06-14 17:47
639 查看
我的博客已迁移到xdoujiang.com请去那边和我交流 项目有台online机器需要迁移到另外1台上去 上面有多个不同目录需要 scp到另外1台上去 发现使用sshfs一次性的将目录挂载过来 在本地复制后在umount 这样省事也方便,也省去每次scp需要敲密码了。 基础环境 severA=192.168.1.122(6.0.10)debian severB=192.168.1.120(6.6)centos 1、安装sshfs(SSHFS - filesystem client based on ssh) apt-get -y install sshfs 2、挂载格式 sshfs [user@]host:[dir] mountpoint [options] 3、将severB机器上的/opt/111目录挂载到severA的/mnt下 echo "redhat"|sshfs -o nonempty,allow_other,password_stdin jimmy@192.168.1.120:/opt/111 /mnt 4、参数说明 -o password_stdin read password from stdin (only for pam_mount!) -o nonempty allow mounts over non-empty file/dir -o allow_other allow access to other users 5、查看挂载 df -Th Filesystem Type Size Used Avail Use% Mounted on /dev/sda1 ext3 19G 2.1G 16G 12% / tmpfs tmpfs 494M 0 494M 0% /lib/init/rw udev tmpfs 490M 156K 490M 1% /dev tmpfs tmpfs 494M 0 494M 0% /dev/shm /dev/sda5 ext3 31G 179M 30G 1% /opt jimmy@192.168.1.120:/opt/111 fuse.sshfs 26G 244M 25G 1% /mnt ==========================centos=========================== centos直接yum安装(前提是有epel源) 1、查询 yum list |grep sshfs fuse-sshfs.x86_64 2.4-1.el6 epel 2、安装 yum -y install fuse-sshfs
相关文章推荐
- linux mount命令的用法详细解析
- ASM磁盘组没有mount的解决办法
- oracle启动和关闭
- 需要同时设置 noatime 和 nodiratime 吗?
- linux下挂载(mount)光盘镜像文件、移动硬盘、U盘、Windows网络共享和NFS网络共享
- linux下安装新硬盘并挂载mount
- 使RHEL6.4支持ntfs文件系统 安装gcc
- mount一个目录到另外一个目录
- openwrt mount usb Invalid argument
- linux的mount(挂载)命令详解
- VirtualBox上编译android遇到共享文件夹引起的问题
- /bin/mount: unrecognized option `--no-canonicalize' 问题的解决方法
- mount 带有分区的loopback设备
- linux ntfs格式硬盘挂载
- linux使用 mount 命令 挂载光驱
- RHEL6挂接iso映像时出现找不到介质
- 挂在lvm和lvm2
- 不能优盘引导的服务器安装ubuntu desktop
- Linux下mount挂载后,原目录下的内容消失
- mount.md