Mount a remote file system using SSHFS
Reminder: you can left-scroll and right-scroll the long code blocks
SSHFS allows you to mount a folder on a remote server as file system on your local computer. Its main advantage compared to others possible methods like SFTP is that SSHFS works a normal Linux’s file system, meaning you have file cursors for example.
If you already have an SSH access to the server, you have nothing to do server side.
Follow the simple steps above in order to mount a remote file system using sshfs.
(TODO: generate the ssh key pair to provide ssh access to the server)
- Install sshfs if not done already
1 | sudo apt-get update && sudo apt-get install sshfs |
On Fedora:
1 | sudo dnf update && sudo dnf install sshfs |
- Create the mount point
1 | mkdir -p ~/path/to/mount-dir |
- Mount the drive
1 | sshfs user@domain.com:/path/to/shared/folder ~/path/to/mount-dir |
- To unmount:
1 | fusermount -u ~/path/to/mount-dir |
See you soon !
Keep learning !
Written on Sun Oct 21st 2018, 8:31 GMT+00:00.
Last updated on Sun Oct 21st 2018, 8:31 GMT+00:00.