How To Mount Remote File Systems Over SSH

Published in: CLI, Linux, MacOS

I have a remote storage server in a colocation with 100s of TB of space. Yes, I know I have data-hoarding issues, no I am not going to get psychiatric help for it. But if you are like me and often find yourself accessing your data remotely there better ways to browse your data unlike GUI based SFTP client. You can mount your remote drive/folder using SSHFS and it will work similar to browsing your local hard drive. Why would you want to use SSFS when there are third-party GUI clients out there to make this job easier for you? The same reason you use SSH to log in to your server and don’t want the third party to have access to your private SSH keys. It’s more than just convenience, this is also a more secure way to access your server.

In Linux (Ubuntu), you can install SSHFS using apt-get install sshfs.
In OSX, you can install SSHFS using brew cask install osxfuse and then brew install sshfs.

The step to mount remote drive itself is very easy: sshfs username@hostname: -ovolname=
You can also make this mount persistent across reboot by making a mount entry on your /etc/fstab/ like this: :/home/users /root/sshfs fuse defaults 0 0

Now you should be able to browse your remote drive using your local file browser.




about | twitter | facebook | archive | rss