Skip to content

Instantly share code, notes, and snippets.

@kapb14
Created September 13, 2018 13:30
Show Gist options
  • Select an option

  • Save kapb14/8ca3b8995b00ba3a41ba012a31adc717 to your computer and use it in GitHub Desktop.

Select an option

Save kapb14/8ca3b8995b00ba3a41ba012a31adc717 to your computer and use it in GitHub Desktop.
Automount SSHFS share with systemd
[Unit]
Description=SSHFS share with logs
Requires=network-online.target
[Automount]
Where=/mnt/mail/var
TimeoutIdleSec=301
[Install]
WantedBy=graphical.target
[Install]
WantedBy=multi-user.target
[Unit]
Description=SSHFS share on old mail server
Requires=network-online.target network.target
After=network-online.service network.target
[Mount]
[email protected]:/var
Where=/mnt/mail/var
Type=fuse.sshfs
Options=allow_other,uid=33,gid=33,default_permissions,_netdev,nonempty,UserKnownHostsFile=/dev/null,StrictHostKeyChecking=no,HostKeyAlgorithms=+ssh-dss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment