How to mount SFTP share in Linux machine

This could be implemented using both FUSE and SSHFS.

Download both from

1. Install FUSE

package: fuse-x.tar.gz

Extract and install
#tar xvf fuse-x.tar.gz
#cd fuse-x
#make install

After successful installation, install SSHFS

package: sshfs-fuse-x.tar.gz

Extract and install
#tar xvf sshfs-fuse-x.tar.gz
#cd sshfs-fuse-x
#make install

Now we can use sshfs to mount sftp share. Before mounting, create mount point where the share to be mounted.

#mkdir /mnt/sftpshare

Mount command:  sshfs <username>@<sftpserver IP/host>:/<sftp_share_path> /<mountpoint>

#sshfs testuser@ /mnt/sftpshare/

This will prompt for password if user configured any password.

NOTE:  If you want to avoid prompting for password,then you should configure key based ssh login between these servers.

Verify the mounted partition using df command.

To mount this share directory in boot time, add the following entry in /etc/fstab

sshfs#testuser@     /mnt/sftpshare          fuse                   defaults        0 0

NOTE:     For unmounting this partition,we can use fusermount command as below
#fusermount -u /mnt/sftpshare/


Install APC in cPanel server

You can install APC (Alternative PHP Cache) in your cpanel server using the following steps:

# pecl install apc

Then add the extension in the php.ini file.

You can get the php.ini file by

# php –ini

Add the following line to it.


Then, retart apache service and you are good to go.

I encountered the following error while installation.

“checking whether the C compiler works… configure: error: cannot run C compiled programs.”

I made it working by the following:

# mount -o remount,exec,suid /tmp

Complete the installation and don’t forget to remount the tmp directory with noexec, nosuid options after the installation.