有时候需要在两台服务器上传文件的话,就需要安装samba后再挂载远程目录,或者从一台服务器上用wget下载另一台服务器上的文件,如果没有httpd的话,也是不行。这时候用sshfs来挂载另一个台服务器上的目录就很省事情了。
2016-06-15 12:29:04
安装很简单,apt-get install sshfs就可以了,
使用文法:
sshfs username@192.168.1.101:/tmp/ /mnt/ -p 22
这新就完成了
主要参数:
-p PORT equivalent to '-o port=PORT'#指定端口
-C equivalent to '-o compression=yes' #启用压缩
-F ssh_configfile specifies alternative ssh configuration file #使用非默认的ssh配置文件
-o reconnect reconnect to server #自动重连
-o no_readahead synchronous reads (no speculative readahead) #提前预读
-o sshfs_debug print some debugging information #显示debug信息
-o cache=BOOL enable caching {yes,no} (default: yes) #能缓存目录结构之类的信