Use SSHFS mount remote directory to local under Ubuntu

Source: Internet
Author: User

Reference Link: http://blog.csdn.net/netwalk/article/details/12952719

I. Install SSHFS on Ubuntu

The Ubuntu source already contains the SSHFS, as well as the required fuse packs, which can be installed directly:

sudo Install SSHFS  

The user group fuse is created automatically when installing, and users who want to use SSHFS need to add to this user group first (remember to log in again after completion), otherwise they will not have permission to execute Fusermount:

Fuse:failed to exec Fusermount:permission denied

Second, Mount remote file System/Directory

The general format for mounting is:

sudo ID hostname Mount ID ID}}  

Among the more important options are:

-o transform_symlinks represents the conversion of an absolute link symbol to a relative link symbol-o follow_symlinks follows the link symbol on the server -C compression, or-O compression=  Yes-o Reconnect Auto-re-connect -o cache=yes-o allow_other

The mount format looks cumbersome, and here's a more concise format for common use:

Sshfs-o transform_symlinks-ofollow_symlinks  [email protected]:[dir] Mountpoint  

One instance is used as follows (the previous user is the user of the remote host and the latter is the user of the local host):

Sshfs–o cache=yes,allow_other [email protected]192.168. 1.200:/home/user/code home/user/code  

Description

1, the connection may require administrator rights, in the Mount command before Sudo can.

2, more parameters please man SSHFS, if you encounter other problems, please refer to the official FAQ.

3, if you want to not enter the password, you can use the SSH key authentication method.

4. After executing the command, Ubuntu will automatically display the mounted SSHFS file system disk on the desktop, and now you can manipulate the mapped disk as if it were a local disk.

Third, uninstall

Fusemount–u/home/user/code

Use SSHFS to mount remote directories locally under Ubuntu

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.