You
can easily mount remote server file system or your own home directory
using special sshfs and fuse tools.
On Ubuntu/Debain
[shashi@server1 ~]# apt-get install sshfs
On
Redhat/CentOS/Fedorarpm -ivh fuse-sshfs-1.8-1.el5.rf.i386.rpm
My local mount
point: /mnt/ssh
[shashi@server1
~]# mkdir /mnt/ssh
Step2:
I will mount server2(192.168.0.102) root directory in server1. Run
this command in server1.
Its
a temporary mount.
[shashi@server1
~]# sshfs root@192.168.0.102:/ /mnt/ssh/
Step3:
check mount point :-
[shashi@server1
~]# mount -a
[shashi@server1
~]# mount & df -h
root@192.168.0.101:/
on /mnt/ssh/ type fuse.sshfs (rw,nosuid,nodev,max_read=65536)
Step4: So
what about mounting it permanently?. We can do it by editing fstab
file
[shashi@server1
~]# vi
/etc/fstab
go
to last line and type below line
sshfs#root@192.168.0.102:/
/mnt/ssh fuse defaults 0 0
[shashi@server1
~]# mount -a
Step5:
What about unmounting this drive?
[shashi@server1
~] # umount
/mnt/ssh
OR
[shashi@server1
~]#
fusermount
-u /mnt/ssh
No comments:
Post a Comment