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