简单好用的sshfs -- 通过ssh映射远程路径(转)
2014-05-26 10:15
591 查看
最近习惯性访问N个Linux机器,在不同机器间跳来跳去,很是麻烦,最终,找到了sshfs,可以把远程目录直接映射到本地,无需修改远程机器的设置,仅要求有ssh连接的权限(ssh都没有的话,还能干啥?!~!)
官网地址:http://fuse.sourceforge.net/sshfs.html
安装:
先看看选项:
实际使用:
官网地址:
安装:
#如果是ubuntu apt-getinstallsshfs #如果是Fedore yuminstallfuse-sshfs #如果是CentOS,貌似只能自己安装了 wgethttp://nchc.dl.sourceforge.net/project/fuse/sshfs-fuse/2.4/sshfs-fuse-2.4.tar.gztarxvfsshfs-fuse-2.4.tar.gz cdsshfs-fuse-2.4./configure #如果缺glib2什么的,就自行装上 makeinstall
先看看选项:
generaloptions:-oopt,[opt...]mountoptions -h--helpprinthelp -V--versionprintversion SSHFSoptions:-pPORTequivalentto'-oport=PORT'-Cequivalentto'-ocompression=yes'#启用压缩,建议配上-Fssh_configfilespecifiesalternativesshconfigurationfile#使用非默认的ssh配置文件-1equivalentto'-ossh_protocol=1'#不要用啊-oreconnectreconnecttoserver#自动重连-odelay_connectdelayconnectiontoserver -osshfs_syncsynchronouswrites -ono_readaheadsynchronousreads(nospeculativereadahead)#提前预读-osshfs_debugprintsomedebugginginformation -ocache=BOOLenablecaching{yes,no}(default:yes)#能缓存目录结构之类的信息-ocache_timeout=Nsetstimeoutforcachesinseconds(default:20)-ocache_X_timeout=Nsetstimeoutfor{stat,dir,link}cache -oworkaround=LISTcolonseparatedlistofworkarounds nonenoworkaroundsenabled allallworkaroundsenabled [no]renamefixrenamingtoexistingfile(default:off)[no]nodelaysrvsetnodelaytcpflaginsshd(default:off)[no]truncatefixtruncateforoldservers(default:off)[no]buflimitfixbufferfillupbuginserver(default:on)-oidmap=TYPEuser/groupIDmapping,possibletypesare:#文件权限uid/gid映射关系 nonenotranslationoftheIDspace(default) useronlytranslateUIDofconnectinguser -ossh_command=CMDexecuteCMDinsteadof'ssh'-ossh_protocol=Nsshprotocoltouse(default:2)#肯定要2的-osftp_server=SERVpathtosftpserverorsubsystem(default:sftp)-odirectport=PORTdirectlyconnecttoPORTbypassingssh -otransform_symlinkstransformabsolutesymlinkstorelative -ofollow_symlinksfollowsymlinksontheserver -ono_check_rootdon'tcheckforexistenceof'dir'onserver -opassword_stdinreadpasswordfromstdin(onlyforpam_mount) -oSSHOPT=VALsshoptions(seemanssh_config) Moduleoptions: [subdir] -osubdir=DIRprependthisdirectorytoallpaths(mandatory) -o[no]rellinkstransformabsolutesymlinkstorelative [iconv] #字符集转换,对我这种UTF8控,默认已经是最好的 -ofrom_code=CHARSEToriginalencodingoffilenames(default:UTF-8) -oto_code=CHARSETnewencodingofthefilenames(default:UTF-8)
实际使用:
挂载(如果配上sshkey就可以完全自动化了): sshfsroot@192.168.9.109:/opt/opt/s109 卸载: fusermount-u/opt/s109
相关文章推荐
- 使用 sshfs 映射远程 ssh 文件系统到本地
- 在 Ubuntu 上使用 sshfs 映射远程 ssh 文件系统为本地磁盘
- » 在 Ubuntu 上使用 sshfs 映射远程 ssh 文件系统为本地磁盘 Wow! Ubuntu
- linux通过sshfs把远程主机的文件系统映射到本地的目录中(构建文件共享目录)
- sshfs 映射远程ssh文件系统作为本地磁盘
- 如何使用 SSHFS 通过 SSH 挂载远程的 Linux 文件系统或者目录
- 在 Ubuntu 上使用 sshfs 映射远程 ssh 文件系统为本地磁盘
- 使用 sshfs 映射远程 ssh 文件系统到本地
- Ubuntu用sshfs映射远程路径
- sshfs 通过ssh 挂载远程目录
- Ubuntu SSH 客户端的应用 | sshfs映射远程文件系统为本地磁盘
- sshfs通过ssh挂载远程目录到本地
- 一个简单的路由映射,让你的树莓派通过SSH外网可访问
- 通过ssh远程控制局域网内的用户(简单脚本)
- sshfs 通过 ssh 挂载远程目录到本地
- 使用 sshfs 映射远程 ssh 文件系统到本地
- Ubuntu SSH 客户端的应用 | sshfs映射远程文件系统为本地磁盘
- 如何使用_SSHFS_通过_SSH_挂载远程的_Linux_文件系统或者目录
- 通过SSHFS在RHEL中安全的挂载远程Linux/UNIX目录或文件系统
- 远程控制的简单实现之SSH