Derwynd's Weblog

Derwynd's Weblog

RHEL securely mount remote Linux / UNIX directory or file system using SSHFS

Make sure you have the rpmforge repo installed. If not add

$ echo “# Name: RPMforge RPM Repository for Red Hat Enterprise 5 – dag
# URL: http://rpmforge.net/
[rpmforge]
name = Red Hat Enterprise $releasever – RPMforge.net – dag
#baseurl = http://apt.sw.be/redhat/el5/en/$basearch/dag
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1″ > /etc/yum.repos.d/rpmforge.repo

Install
$ yum –enablerepo=rpmforge install fuse fuse-ntfs-3g dkms dkms-fuse$ insmod /lib/modules/2.6.18-8.el5/extra/fuse.ko

Now you have working setup, all you need to do is mount a filesystem under Linux. First create a mount point:

$ mkdir /data

Now mount a remote server filesystem using sshfs command:

$ sshfs root@192.168.50.87:/what2mount /data
check if mounted by the mount command

Now you can access your filesystem securely using Internet or your LAN

$ cd /data

$ touch blah

To umount cd to home folder

$ umount /data

Advertisements

November 10, 2008 - Posted by | Uncategorized

Sorry, the comment form is closed at this time.

%d bloggers like this: