First realize the ordinary user password-free host1 can log in Host2
host1# yum install fuse SSHFS; If it doesn't fit, you need to install the EPEP source--enablerepo=epel
host1# su-es; Ssh-keygen
host2# Mkdir/data/es-bak; Chown-r Es:es/data/es-bak
Permissions for normal user Authorized_keys must be limited to 600
host2# su-es; chmod. SSH; cd. SSH; chmod 0600 Authorized_keys; VI authorized_keys Copy the id_rsa.pub content generated by host1 es user
host1# su-es;
host1$ ssh-p host2 here can be password-free login
[Email protected] ~]# su-es
[Email protected] ~]$ sshfs-p 192.168.4.15:/data/es-bak/mnt/es-bak
Fuse:failed to exec Fusermount:permission denied
Because ES users are not in the fuse group
[email protected] ~]# groups ES
Es:es
[Email protected] ~]# usermod-a-G fuse ES
[email protected] ~]# groups ES
Es:es Fuse
You can do it again after you join.
SSHFS for ordinary users to read and write