Contents

Linux cookbook

Linux cookbook

Remote file system over SSH

Install sshfs ubuntu

sudo apt install sshfs

fedora/almalinux

sudo dnf install fuse-sshfs

arch

sudo pacman -S sshfs

Create Mount Point

Create a mount point directory in the mnt folder where the remote file system will be mounted:

sudo mkdir /mnt/<folder name>

Mount the Remote File System Using SSHFS

Mount the remote file system to the created mount point using the SSHFS tool:

sudo sshfs [-o <options>] <remote user>@<remote host>:/<remote directory> /mnt/<folder>/

Enter the login password when requested if using password authentication. If the remote server uses SSH key authorization, provide the path of the private key. For example:

sudo sshfs -o allow_other,IdentityFile=/home/user/.ssh/id_rsa user@1.1.1.33:/home/user/ /mnt/test/

cron

Sometimes need to repeat a command at certain time

sudo crontab -e 

for example ping

0 * * * * ping 192.168.0.1 -c 33
1 * * * * ping 102.168.1.2 -c 33
``