Q & A
-
-
0
Nota -
0
Optiuni -
525
Accesari -
CritiC
How to mount SFTP share in remote Linux machine?
- 2 years ago
GNU/Linux
- 2 years ago
This could be implemented with FUSE and SSHFS. Download path: http://fuse.sourceforge.net/sshfs.html
1. FUSE
package: fuse-2.8.5.tar.gz
Extract and install
#tar xvf fuse-2.8.5.tar.gz #cd fuse-2.8.5 #./configure #make #make install
After successful installation,install SSHFS
2.SSHFS
package: sshfs-fuse-2.2.tar.gz
Extract and install
#tar xvf sshfs-fuse-2.2.tar.gz #cd sshfs-fuse-2.2 #./configure #make #make install
Now we can use sshfs to mount sftp share.Before mounting,create mount point where the share to be mounted.
#mkdir /mnt/ftpshare
Mount command: sshfs
#sshfs testuser@192.168.1.2:/home/testuser /mnt/ftpshare/
This will prompt for password if user configured any password.
NOTE: If you want to avoid prompting for password,then you should configure passwordless(key based) ssh login between these servers.(Assuming you are aware of how to configure it)
Verify the mounted partition using df command.
To mount this share directory in boot time,we need to add the following entry in /etc/fstab
sshfs#testuser@192.168.1.2:/home/testuser /mnt/ftpshare fuse defaults 0 0
NOTE: For unmounting this partition,we can use fusermount command as below
#fusermount -u /mnt/ftpshare/
- Comenteaza
- powered by Verysign