---
title: "ubuntu ssh  挂载远程目录到本地"
author: "xiaolin0199"
date: "2015-11-03T14:22:38Z"
tags: []
categories: ["操作系统"]
slug: "ubuntu-ssh"
draft: false
lastmod: "2015-11-03T14:40:04Z"
id: 2254122
url: "https://xiaolin0199.iteye.com/blog/2254122"
---

\* 用的是ssh，所以安全！

\* 方便，直接在本地电脑上就可以操作远程电脑上的目录，就跟在本地操作一样

 

1. **sudo apt-get install sshfs  安装sshfs模块**

**2. sudo modprobe fuse 加载此模块**

**3. 加载一些权限 username 是你的本地登陆用户** 

**sudo adduser &lt;username&gt; fuse** 

**sudo chown** **&lt;username&gt;:fuse /dev/fuse**  
**sudo chmod +x /dev/fuse**

**4. mkdir ~/remoteserv  建立一个本地目录来挂载远程目录**

**5. sshfs &lt;remote username&gt;@&lt;remote ipaddress&gt;:/remotepath ~/remoteserv  进行挂载**

**6. fusermount -u ~/remoteserv　取消挂载**