Here is a cool way of mounting file system from the remote SSH server in the local system. The user space file system implementation “Fuse” makes it possible.

You need to install package “sshfs” in your system as shown below.

[root@techpulp ~]# yum -y install sshfs
fedora                                                                         | 2.8 kB     00:00
updates                                                                        | 3.4 kB     00:01
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package fuse-sshfs.i386 0:2.2-5.fc10 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================
Package                   Arch                Version                   Repository              Size
======================================================================================================
Installing:
fuse-sshfs                i386                2.2-5.fc10                updates                 49 k

Transaction Summary
======================================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 49 k
Is this ok [y/N]: y
Downloading Packages:
fuse-sshfs-2.2-5.fc10.i386.rpm                                                 |  49 kB     00:06
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : fuse-sshfs                                                                     1/1

Installed:
fuse-sshfs.i386 0:2.2-5.fc10

Complete!
[root@techpulp ~]#

Use following syntax to mount remote directory of a system running SSH server to a local directory.

[root@techpulp ~]# sshfs user@remotehost:remotedir localdir

For example, the following command mounts a directory “/home/neo/mywork” of a remote server “172.16.5.24″ to a local directory “/work/neo”. This command uses “neo” as login name and appropriate password needs to be given when the command prompts for password.

[root@techpulp ~]# sshfs neo@172.16.5.24:/home/neo/mywork /work/neo
The authenticity of host 'neo.techpulp.com (172.16.5.24)' can't be established.
RSA key fingerprint is 42:e2:d1:7c:2c:83:a7:af:a5:6c:f3:47:8c:a2:6e:82.
Are you sure you want to continue connecting (yes/no)? yes
neo@172.16.5.24's password:
[root@techpulp ~]# df /work/neo
Filesystem           1K-blocks      Used Available Use% Mounted on
neo@localhost:/home/neo/mywork
                      15385884   9394128   5210196  65% /work/neo
[root@techpulp ~]#

You can use standard “umount” command to unmount the file system as shown below:

[root@techpulp ~]# umount /work/neo