ubuntu ssh mount remote directory to local

* Using ssh, so be safe!

* Convenient, you can operate the directory on the remote computer directly on the local computer, just like the local operation

 

1.  sudo apt-get install sshfs install sshfs module

2.  sudo modprobe fuse to load this module

3. Load some permissions username is your local login user 

sudo adduser <username> fuse 

sudo chown <username>:fuse /dev/fuse
sudo chmod +x /dev/fuse

4. mkdir ~/remoteserv   creates a local directory to mount the remote directory

5. sshfs <remote username>@<remote ipaddress>:/remotepath ~/remoteserv  进行挂载

6.  fusermount -u ~/ remoteserv cancel mount

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326942469&siteId=291194637