Tutorial: using sshfs

Use sshfs to mount a remote path through ssh:

  1. Create folder and add sshfs link

    mkdir ~/my-folder
    sshfs [email protected]:/foldertomount/ ~/my-folder
    
  2. Mount external folder

    fusermount -u ~/my-folder
    
  3. Add reconnect options

    sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 [email protected]:/foldertomount/ ~/my-folder
    
    - Allow reconnects
    - Check remote server every 15 seconds
    - Allow up to 3 failed checks
    

    Identify the disk by "lable" and copy the "uuid".

  4. Add ssh key for automatic login

    sshfs -o IdentityFile=~/.ssh/myprivatekey