Access remote folders using ssh
To access my files using ssh i use sshfs, sshfs is a “FUSE” (Filesystem in Userspace) for ssh.
Technically it puts your remote filesystem in your computer as it was in your computer using the secure ssh connection
.
I install sshfs using my distribution package manager and edit my fstab config file
sudo nano /etc/fsab
I then add the following line :
mathieu@connectemoi.eu:/media /mnt/nas fuse.sshfs noauto,x-systemd.automount,_netdev,IdentityFile=/home/mathieu/.ssh/id_ed25519,allow_other 0 0
mathieu@connectemoi.eu:/media
tells the system to connect using user mathieu to the remote server connectemoi.eu to access the /media folder/mnt/nas
is the folder on the local computerfuse.sshfs
tells the system that the filesystem type is sshfsnoauto
not automatically mount the filesystemx-systemd.automount
automount if necessary_netdev
the filesystem is a network filesystemIdentityFile=/home/mathieu/.ssh/id_ed25519
use this keyfile to authenticate using ssh
If I want to access my remote files on my server i have just to type
mount /mnt/nas
and go to the folder /mnt/nas