CentOS SSHFS

Short sweet and too the point.

Thanks to my manager at work, I learned about SSHFS a couple months or so back. So, I decided I wanted it on my “lab” machine, since I found it pretty useful. After some poking around, I found I needed to enable the EPEL repo on my CentOS machine. The write up at: http://www.centosblog.com/enable-epel-repo-on-centos-5-and-centos-6/, is a bit dated. I needed to use a slightly newer version of the repo. The command I used to install/enable the repo was:

rpm -Uvh http://mirror.overthewire.com.au/pub/epel/6/i386/epel-release-6-7.noarch.rpm

After that, it was straight forward.

  1. Install it: yum install fuse sshfs
  2. Enable it: modprobe fuse
  3. Check it was there: lsmod | grep fuse
  4. and make it permanant: echo "modprobe fuse" >> /etc/rc.local

The syntax to mount something is:

sshfs user@remotehost:/remotedirectory /localmountpoint

For example:

sshfs mascio@1.2.3.4:/repos /mnt/repos

If you are going to do a lot of this, I recommend setting up SSH keys so you do not need to keep entering your password. Of course, if you use no passwords on your private key, you’d better fiercely protect it!

Leave a Reply