Secure Shell FileSystem (SSHFS) is a file system capable of importing remote directories by encrypting traffic through ssh. It is based on fuse, so it will be slower than a traditional file system and if we also take into account the network latency, it can lose a lot of performance. However, under normal conditions and if we do not have special requirements, it works quite decently.
To be able to use fuse, we must have a kernel compiled with support for it, the option to enable is:
File systems ---> FUSE (Filesystem in Userspace) support
We install the necessary software:
We mount the remote directory:
sshfs root@IP_SERVER:/root /mnt/sshfs
Now we can access the contents of the remote directory in /mnt/sshfs as if it were a local directory ;)
In fact, we can see the space of the directory using df:
We unmount the directory:
This is a way to access a remote directory easily and securely without the need to install additional software since, being a server, ssh will be almost mandatory.