通过SSHFS在RHEL中安全的挂载远程Linux/UNIX目录或文件系统--转载
You can easily mount remote server file system or your own home directory using special sshfs and fuse tools.
FUSE - Filesystem in Userspace
FUSE is a Linux kernel module also available for FreeBSD, OpenSolaris and Mac OS X that allows non-privileged users to create their own file systems without the need to write any kernel code. This is achieved by running the file system code in user space, while the FUSE module only provides a “bridge” to the actual kernel interfaces. FUSE was officially merged into the mainstream Linux kernel tree in kernel version 2.6.14.
You need to use SSHFS to access to a remote filesystem through SSH or even you can use Gmail account to store files.
Following instructions are tested on CentOS, Fedora Core and RHEL 4/5 only. But instructions should work with any other Linux distro without a problem.
Step # 1: Download and Install FUSE
Visit fuse home page and download latest source code tar ball. Use wget command to download fuse package:# wget http://superb-west.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.5.tar.gz
Untar source code:# tar -zxvf fuse-2.6.5.tar.gz
Compile and Install fuse:# cd fuse-2.6.5
# ./configure
# make
# make install
Step # 2: Configure Fuse shared libraries loading
You need to configure dynamic linker run time bindings using ldconfig command so that sshfs command can load shared libraries such as libfuse.so.2:# vi /etc/ld.so.conf.d/fuse.conf
Append following path:/usr/local/lib
Run ldconfig:# ldconfig
Step # 3: Install sshfs
Now fuse is loaded and ready to use. Now you need sshfs to access and mount file system using ssh. Visit sshfs home page and download latest source code tar ball. Use wget command to download fuse package:# wget http://easynews.dl.sourceforge.net/sourceforge/fuse/sshfs-fuse-1.7.tar.gz
Untar source code:# tar -zxvf sshfs-fuse-1.7.tar.gz
Compile and Install fuse:# cd sshfs-fuse-1.7
# ./configure
# make
# make install
Mounting your remote filesystem
Now you have working setup, all you need to do is mount a filesystem under Linux. First create a mount point:# mkdir /mnt/remote
Now mount a remote server filesystem using sshfs command:# sshfs vivek@rock.nixcraft.in: /mnt/remote
Where,
- sshfs : SSHFS is a command name
- vivek@rock.nixcraft.in: - vivek is ssh username and rock.nixcraft.in is my remote ssh server.
- /mnt/remote : a local mount point
When promoted supply vivek (ssh user) password. Make sure you replace username and hostname as per your requirements.
Now you can access your filesystem securely using Internet or your LAN/WAN:# cd /mnt/remote
# ls
# cp -a /ftpdata . &
To unmount file system just type:# fusermount -u /mnt/remote
or# umount /mnt/remote
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
来源:http://biancheng.dnbcw.info/win2003/272443.html
通过SSHFS在RHEL中安全的挂载远程Linux/UNIX目录或文件系统--转载的更多相关文章
- sshfs基于ssh挂载远程目录
为了像本地一样访问远程主机上的目录,通常我们会在远程主机上使用nfs来导出目录,并在本地主机上mount这个nfs文件系统.如果是windows系统,则使用cifs或samba的方式来访问. 但可能我 ...
- 如何用ssh挂载远程目录
如何用ssh挂载远程目录 标签: sshserver服务器linux网络 2011-06-24 10:05 2979人阅读 评论(0) 收藏 举报 版权声明:本文为博主原创文章,未经博主允许不得转载. ...
- Ubuntu下使用sshfs挂载远程目录到本地(和Windows挂载盘一样)
访问局域网中其他Ubuntu机器,在不同机器间跳来跳去,很是麻烦,如果能够把远程目录映射到本地无疑会大大方面使用,就像Windows下的网络映射盘一样.在Linux的世界无疑也会有这种机制和方式,最近 ...
- 使用sshfs挂载远程服务器目录
点击访问原文 您还可以加入全栈技术交流群(QQ群号:254842154) 服务器日志查看,是开发人员和服务器运维人员在工作中经常会遇到的一件事情,只有一台服务器时,比较好办,直接登录服务器使用tail ...
- ssh key 免密码登陆服务器,批量分发管理以及挂载远程目录的sshfs
ssh key 免密码登陆服务器,批量分发管理以及挂载远程目录的sshfs 第一部分:使用ssh key 实现服务器间的免密码交互登陆 步骤1: 安装openssh-clients [root@001 ...
- Ubuntu 下使用 sshfs 挂载远程目录到本地
参考链接:http://blog.csdn.net/netwalk/article/details/12952719 一.Ubuntu 上安装sshfs Ubuntu源中已经包含了sshfs,以及所需 ...
- Linux安装sshfs挂载远程目录到本地及卸载
挂载远程目录的方式很多,这里把sshfs记录一下备忘.Linux用sshfs挂载远程目录到本地 安装sshfs 在Ubuntu下,只需要使用 $ sudo apt-get install sshfs ...
- Ubuntu下使用sshfs挂载远程目录到本地
访问局域网中其他Ubuntu机器,在不同机器间跳来跳去,很是麻烦,如果能够把远程目录映射到本地无疑会大大方面使用,就像Windows下的网络映射盘一样.在Linux的世界无疑也会有这种机制和方式,最近 ...
- 虚拟机中如何Linux系统如何访问PC硬盘中的文件(如何将windows下的文件夹挂载到linux虚拟机下)
这段时间决定学习嵌入式,变打算安装个Linux系统先熟悉一下Linux系统的使用,但自己电脑上安装的win7系统又不想装双系统,一是闲麻烦,二是由于对Linux系统不熟悉担心会因为自己的误操作而损坏系 ...
随机推荐
- window scipy install
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy whl包,使用pip install xx.whl 安装 1:先安装 numpy+mkl. whl ...
- xadmin的插件机制
xadmin的视图方法中如果加了@filter_hook 标记的都可以作为插件的钩子函数. 例如在ListAdminView类中有许多加了上述标记的方法, @filter_hook def get_c ...
- 2016030101 - ubuntu15.1上安装git客户端
使用ubutun15.1安装git客户端. 根据git官网提示内容(参考http://git-scm.com/download/linux) 1.使用命令:sudo apt-get install g ...
- jsp表单提交中文乱码的解决
<%@ page language="Java" contentType="text/html; charset=utf-8 " pageEncod ...
- Android Learning:多线程与异步消息处理机制
在最近学习Android项目源码的过程中,遇到了很多多线程以及异步消息处理的机制.由于之前对这块的知识只是浅尝辄止,并没有系统的理解.但是工程中反复出现让我意识到这个知识的重要性.所以我整理出这篇博客 ...
- MySQL驱动阅读------executeQuery查询的过程,基于JDBC-----5.1.26
Statement statement = connection.createStatement(); final ResultSet resultSet = statement.executeQue ...
- 非常好用的正则表达式"\\s+" - 匹配任意空白字符
说起来,博主使用过的正则场景虽然不多,但是就是在这当中,我发现"\\s+"真好用! 详解 "\\s+" 正则表达式中\s匹配任何空白字符,包括空格.制表符.换页 ...
- 业界良心:Square开源Viewfinder,25万行代码全公布!
http://www.csdn.net/article/2014-05-06/2819633-square-open-sources-viewfinder https://github.com/vie ...
- vc2010配置opencv2.4.4库(图文 转)
VC 2010下安装OpenCV2.4.4 说明: 安装平台:32位XP,VS2010: OpenCV 2.4.4不支持VC 6.0: 网上有很多用CMake编译OpenCV的安装教程,这 ...
- 【POJ1067】取石子游戏 (威佐夫博弈)
[题目] Description 有两堆石子,数量任意,可以不同.游戏开始由两个人轮流取石子.游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子:二是可以在两堆中同时取走相同数量的 ...