sshfs命令掛載遠程目錄(debian centos)

來源:互聯網
上載者:User

標籤:sshfs mount

項目有台online機器需要遷移到另外1台上去 上面有多個不同目錄需要scp到另外1台上去 發現使用sshfs一次性的將目錄掛載過來 在本地複製後在umount這樣省事也方便,也省去每次scp需要敲密碼了。基礎環境severA=192.168.1.122(6.0.10)debian severB=192.168.1.120(6.6)centos1、安裝sshfs(SSHFS - filesystem client based on ssh)apt-get -y install sshfs2、掛載格式sshfs [[email protected]]host:[dir] mountpoint [options]3、將severB機器上的/opt/111目錄掛載到severA的/mnt下echo "redhat"|sshfs -o nonempty,allow_other,password_stdin [email protected]:/opt/111 /mnt4、參數說明-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 users5、查看掛載df -ThFilesystem    Type    Size  Used Avail Use% Mounted on/dev/sda1     ext3     19G  2.1G   16G  12% /tmpfs        tmpfs    494M     0  494M   0% /lib/init/rwudev         tmpfs    490M  156K  490M   1% /devtmpfs        tmpfs    494M     0  494M   0% /dev/shm/dev/sda5     ext3     31G  179M   30G   1% /opt[email protected]:/opt/111        fuse.sshfs     26G  244M   25G   1% /mnt==========================centos===========================centos直接yum安裝(前提是有epel源)1、查詢yum list |grep sshfsfuse-sshfs.x86_64                          2.4-1.el6                     epel2、安裝yum -y install fuse-sshfs


本文出自 “7928217” 部落格,請務必保留此出處http://7938217.blog.51cto.com/7928217/1661793

sshfs命令掛載遠程目錄(debian centos)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.