centos 使用sshfs快速搭建檔案分享權限設定服務

來源:互聯網
上載者:User

標籤:centos 使用sshfs快速搭建檔案分享權限設定服務

centos 使用sshfs快速搭建檔案分享權限設定服務 看了很多教程都寫的不夠完整所以自己根據實際操作找遇到的坑共用一下給大家

共用檔案伺服器必須開啟ssh伺服器

執行個體:IP192.168.7.50yum -y install epel-release # 安裝epel 源碼yum -y install fuse-sshfs # 安裝sshfs sshfs -o allow_other,nonempty [email protected]:/opt/ /opt/http指定密鑰檔案sshfs -o allow_other,nonempty ,IdentityFile=~/.ssh/id_rsa_storm1 [email protected]:/opt/ /opt/http開機啟動就添加映射vim /etc/fstabsshfs#[email protected]:/opt/ /opt/http fuse  defaults,auto,allow_other,nonempty,IdentityFile=~/.ssh/id_rsa_storm1  0  0也可以修改/etc/ssh/ssh_config 指定ssh使用私密金鑰檔案添加 sed -i "/#   Port 22/i\IdentityFile ~\/.ssh\/id_rsa_storm1" /etc/ssh/ssh_config ssh 密鑰產生 ssh-keygen輸入:id_rsa_storm1copy 公開金鑰到遠程伺服器ssh-copy-id -i [email protected] 注意:如果要使用web服務能夠訪問共用目錄一定要添加allow_other 參數


本文出自 “成長記錄” 部落格,請務必保留此出處http://juestnow.blog.51cto.com/1515305/1878984

centos 使用sshfs快速搭建檔案分享權限設定服務

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.