When you operate multiple Linux servers it often becomes necessary to copy or move files between them. May this be a CMU-Export that needs to be copied, a MySQL database dump or whatever else.
Sure, there are plenty of ways how to do this: FTP, SCP, NFS (which is bad idea), SMB - just to name a few.
NFS is pretty unsafe and SMB has too much configurational overhead for just using it once in a while. So each method has its benefits and disadvantages.
BlueOnyx now also supports "fuse-sshfs".
What is "fuse-sshfs"?
SSHFS (Secure SHell FileSystem) is a file system for Linux (and other operating systems with a FUSE implementation, such as Mac OS X or FreeBSD) capable of operating on files on a remote computer using just a secure shell login on the remote computer.
On the local computer where the SSHFS is mounted, the implementation makes use of the FUSE (Filesystem in Userspace) kernel module. The practical effect of this is that the end user can seamlessly interact with remote files being securely served over SSH just as if they were local files on his/her computer. On the remote computer the SFTP subsystem of SSH is used.
How to install it?
All you need to do is to install it via YUM:
yum install fuse-sshfs
It will install fuse-sshfs, fuse and fuse-libs.
How to use it?
Say you are logged in to the Blueonyx server here.company.com and you want to access the directory /home/export on there.company.com.
The first thing you do is to install 'fuse-sshfs' as outlined above. You only need to install it on the server where you are using it from to mount the share. In our case that is here.company.com. The box where the directory is that you want to mount just needs SSH running and fuse-sshfs does not need to be installed there.
Then you create an empty directory as 'root' on here.company.com to which you want to 'mount' the directory /home/export on there.company.com:
here#> mkdir /home/there
Then you run this command to mount the remote directory via SSHFS:
here#> sshfs -p 22 email@example.com:/home/export /home/there
The parameter "-p 22" specifies the SSH port on the target server (there.company.com). By default SSH runs on port 22, so you don't really have to specify it. But if your SSH on there.company.com runs on a different port than 22, then change this to the correct port.
When you are done, you can unmount the SSHFS share this way:
here#> umount /home/there
For more information consult the SSHFS manpage: