通过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系统不熟悉担心会因为自己的误操作而损坏系 ...
随机推荐
- DataTable 无法转换的错误
目前基本上检索都已经离不开Linq了.所以最近在Linq的过程中出现了一些意外情况,特此记录下来. 先描述一下场景: 有一个查询的要求是这样的,检索出Status > 1 的数据.因为要根据其他 ...
- 【算法】一般冒泡排序 O(n^2) 稳定的 C语言
冒泡排序 一.算法描述 假设序列中有N个元素: 第一趟选取第一个元素作为关键字,从左至右比较,若遇到比它小的则放到它左边(也即两数进行交换),若遇到比它大的,则改为选取该元素作为关键字完成后续的比较, ...
- PyCharm使用技巧记录(一)如何查看变量
[为了方便自己以后查阅,记录下使用PyCharm时的一些小技巧] 正在学习Python,在调试Python程序时,遇到了一个非常大的问题:如何能够方便地查看变量的取值呢? 由于使用matlab多年,深 ...
- java 上下文切换
上下文概念 在高性能编程时,经常接触到多线程. 起初我们的理解是, 多个线程并行地执行总比单个线程要快, 就像多个人一起干活总比一个人干要快. 然而实际情况是, 多线程之间需要竞争IO设备, 或者竞争 ...
- 安卓天天练练(四)drawable state 属性
今天又作茧自缚(item 写成 itme ╮(╯▽╰)╭ elipse还自动闭合了标签,来回查查查看报错,为啥点击无效呢!) 真欠抽,怪不得上班地铁上被个sb踢到脚趾头(目测有可能是同家公司的..同站 ...
- astyle基本功能介绍
astyle是一个命令行工具,语法格式如下 astyle [options] < original > 例如: astyle --style=ansi foo.cpp 上面的命令将美化fo ...
- TCP/IP 邮件的原理
邮件通过SMTP协议来实现,有它的服务器SMTP服务器. 它是怎么在万维网中运行的呢? 我们来看看两个案例,下面的两个图来展示. 案例一: Alice通过传统的邮件服务器发送给Bob,Bob通过HTT ...
- poj3709
首先我们发现将一段数变为同一个数比间隔着搞肯定优,因为数列是升序的,然后不难得到方程式f[i]=min(f[j]+sum[i]-sum[j]-(i-j)*a[j+1]) (i-j>=m)简单的斜 ...
- ☀【SeaJS】SeaJS Grunt构建
如何使用Grunt构建一个中型项目?https://github.com/twinstony/seajs-grunt-build spmjshttp://docs.spmjs.org/doc/inde ...
- 初识DirectX和COM
一.COM 1.什么是COM对象 一个COM对象事实上是一个或一套实现了大量接口的C++类 2.COM的优点 不用重新编译你的程序就能升级COM模块 3.COM概貌 4.COM对象的接口 QueryI ...