How to mount remote directory using SSH and make it available it as local directory.
Install the module sshfs:
[php]sudo apt-get install sshfs[/php]
Load it to kernel
[php]sudo modprobe fuse[/php]
Set permissions
[php]
sudo adduser $USER fuse
sudo chown root:fuse /dev/fuse
sudo chmod +x /dev/fusermount
[/php]
Now create a directory to mount the remote folder in.
[php]mkdir ~/remoteDir[/php]
Run the command to mount remote directory
[php]sshfs [email protected]:/home/public_html ~/remoteDir[/php]
Now remote directory should be mounted.
[php]
cd ~/remoteDir
ls -l
[/php]