CentOS uses SSHFS to quickly build file sharing services to see a lot of tutorials are not complete enough to write their own according to the actual operation to find the pit to share a bit for everyone
The shared file server must have the SSH server open
Example: Ip192.168.7.205yum-y install epel-release # installation Epel source yum-y installed FUSE-SSHFS # install SSHFS sshfs-o allow_other,nonempty [Email protected]:/opt//opt/http Specify key file Sshfs-o allow_other,nonempty, Identityfile=~/.ssh/id_rsa_storm1 [email protected]:/opt//opt/http boot up to add mappings vim/etc/fstabsshfs#[email protected]:/opt//opt/http Fuse Defaults,auto,allow_ Other,nonempty,identityfile=~/.ssh/id_rsa_storm1 0 0 You can also modify/etc/ssh/ssh_config specify SSH to use the private key file to add Sed-i "/# Port 22/i\identi Tyfile ~\/.ssh\/id_rsa_storm1 "/etc/ssh/ssh_config ssh key generation Ssh-keygen input: id_rsa_storm1copy public key to remote server ssh-copy-id-i [ Email protected] Note: If you want to use a Web service to access a common directory, be sure to add the Allow_other parameter
This article is from the "Growth record" blog, so be sure to keep this source http://juestnow.blog.51cto.com/1515305/1878986
CentOS uses SSHFS to quickly build file sharing services