Mounting Remote Folder Through SSH

SSH is a very convenient tool on Linux that can be used to [[port-forwarding-using-ssh-tunnel]], [[proxy-using-ssh-tunnel]] and others besides its basic functions (remote shell). We can also use SSH to mount a remote folder to a local directory.

We can use `sshfs` to mount remote folder through SSH tunnel securely over network.

Install sshfs

Install `sshfs` by yum:

$ sudo yum install sshfs

Mount folder on sever to local folder

Then we can use `sshfs` to mount a remote directory:

$ sshfs username@server:/path/to/folder /path/to/mount/point

Unmount it

We can unmount the directory by `fusermount`:

$ fusermount -u /path/to/mount/point

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.


Leave a Reply

Your email address will not be published. Required fields are marked *