Secure Shell File System (SSHFS) it's a file system for Linux (and others operating systems with an implementation FUSE, just as in Mac OS X), which operates on files on a remote computer using a secure access environment. On the local computer where SSHFS is mounted, the implementation makes use of the kernel module FUSE. The practical effects of this is that the end user can interact friendly with remote files while on a server SSH,viewing them as if they were on your local computer. The subsystem is used on the remote computer SFTP of SSH.
The current implementation of SSHFS using FUSE is a rewritten version of the previous one, made by Miklos Szeredi, who also wrote FUSE.
rokitoh@red-orbita~:$ apt-get install sshfsWe check that we have FUSE loaded
rokitoh@red-orbita~:$ grep ‘fuse’ /etc/modulesfuseIf we don't have it we include it
rokitoh@red-orbita~:$ echo fuse >> /etc/modulesand we load the module
rokitoh@red-orbita~:$ modprobe fuseAlso, to have permissions to mount it we must add the user to the fuse group.
rokitoh@red-orbita~:$ usermod -G fuse -u rokitohOnce added we should restart the graphical environment.
Once the graphical environment has been restarted, we create the folder where we are going to mount the file.
rokitoh@red-orbita~:$ mkdir /home/rokitoh/DATOSNow we just have to put it together.
Syntax:
rokitoh@red-orbita~:$ sshfs <usuario>@<DIRECCION IP REMOTA>:<CARPETA REMOTA> <CARPETA LOCAL>In case we have changed the ssh port, we will have to indicate it with the -p parameter
rokitoh@red-orbita~:$ sshfs -p 2222 <usuario>@<DIRECCION IP REMOTA>:<CARPETA REMOTA> <CARPETA LOCAL>Example:
rokitoh@red-orbita~:$ sshfs rokitoh@192.168.1.180:/media/DATOS/ /home/rokitoh/DATOS/
rokitoh@192.168.1.180′s password:In case we want to unmount the partition it would be like this:
rokitoh@red-orbita~:$ fusermount -u /home/rokitoh/DATOSConfigure to initially mount the system.
To do this we must configure the file /etc/fstab adding the following line:
Syntax:
sshfs#<user>@<REMOTE IP ADDRESS>:<REMOTE FOLDER> <LOCAL FOLDER fuse uid=1000,gid=100,umask=0 0 0
Example
sshfs#rokitoh@192.168.1.180:/media/DATA/ /home/jositoh/DATA fuse uid=1000,gid=100,umask=0 0
So that it does not ask us for a password, we can generate the private/public keys.
In that manual I explain how to do it:
SSH connection without password
Greetings, rokitoh!!!
Comments