Skip to content

Instantly share code, notes, and snippets.

@alxschwarz
Created February 12, 2018 10:59
Show Gist options
  • Save alxschwarz/d21e48fba4347595d4fa972d066d7ab2 to your computer and use it in GitHub Desktop.
Save alxschwarz/d21e48fba4347595d4fa972d066d7ab2 to your computer and use it in GitHub Desktop.
systemd.mount sshfs und sshpass
[Install]
WantedBy=multi-user.target
[Unit]
Description=mount script
Requires=network-online.target network.target
After=network-online.service network.target
[Mount]
What=remote_user@host:/home/remote_user
Where=/home/user/folder
Options=allow_other,uid=<user_uid>,gid=<user_guid>,default_permissions,_netdev,nonempty,UserKnownHostsFile=/dev/null,StrictHostKeyChecking=no,ssh_command=sshpass\040-f\040/root/.sftp-pass\040ssh
Type=fuse.sshfs
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment