Hi, I was trying to set up systemd.automount via sshfs from my laptop to a remote server. The issue I encountered is that systemd mounts the server as PID1, therefore the keyring cannot unlock the rsa password from my user and mount fails. I then had to create a new passwordless rsa in /root/.ssh. The server is now mounted when I access the relative folder but my user cannot unmount it (I need to sudo fusermount -u). Am I missing something on how this feature is supposed to be used? I was expecting it to work like udisk where my user can mount and unmount the usb key. Cheers Mike
Does it work as expected if you add User=<your-user> in the .mount file?
The issue persists after adding User=<your-user> in the .mount file. Cheers Mike
systemd will only deal with system mounts, not user mounts. It is not suitable for interactive mounts and where the credentials required for mounting are inherently bound to some user identity, rather than system identity. sshfs is certainly bound to user identity. This is hence pretty much out-of-focus for systemd itself, the same way as mounting removable disks is done by udisks and out-of-focus for systemd. Sorry.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.