Mount the Directory of another machine (using SSHFS via SSH or Mount with NFS)

Source: Internet
Author: User
Tags anonymous ssh

Install software on the server: sudo apt-get install Nfs-kernel-server

NFS Profile/etc/exports content (originating from Outbound):

Path user name (permissions)

The path can be *. You can also follow the space, user name, and permission section

The Permissions section is separated by commas with the following: RO the host has read-only access to the shared directory RW the host has read and write access to the shared directory Root_squash client uses root to access the shared folder and the root user is mapped to an anonymous user No_root_squash When the client accesses the shared folder with root, the root user is mapped to an anonymous user anonuid the user on the client is mapped to the user of the specified local user ID by all_squash any user on the client computer when accessing the shared directory Anongid Maps a user on a client computer to a specified local user group Idsync data synchronization writes to memory and hard disk async data is temporarily stored in memory, not directly to the hard drive insecure allow unauthorized access from this machine

After you start NFS and then modify the/etc/exports, you do not have to restart the service and use the exports command to/USR/SBIN/EXPORTFS–RV (V is not required). Then SHOWMOUNT-E can see if it takes effect.

Direct MOUNT-T NFS IP address without SSH: Server path Local Path


Via SSH, as described below.

sudo apt-get install SSHFS

SSHFS username @ Address:/path mount point-p port

Fusermount-u mount point for solution hanging

If the network fault, when the device is busy to suspend, you can force umount-f, with the mount point

It is said that it can be put into the/etc/fstab, but I pass the certificate for authentication, so as not to enter the password, so put the mount name in the user's. Profile.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.