I am trying to auto mount a folder from my raspberry pi (
/home/pi/server_folder), to a local folder (
/home/my_name/raspberrypi). I can do this with sshfs (auto mount in fstab) when I set up a blank rsa key, but when I try to use an actual key, like 123, the raspberry pi filesystem wont mount. This is pretty obvious, since I have to supply the passphrase, but is there a way to have it ask for the passphrase when I first try to access
/home/my_name/raspberrypi, or do something similar to that? Because if someone gets my laptop, they dont need to put a password or anything in to get access to my raspberry pi, if I leave the rsa key blank. I have looked into
autosshfs, but autosshfs won't download, and autofs doesn't explain how to mount with an actual rsa key (well, I haven't found a guide on how to). I'm using arch Linux, latest version. Here is the fstab entry:
firstname.lastname@example.org:/home/pi/server_folder/ /home/my_name/raspberrypi fuse.sshfs noauto,x-systemd.automount,_netdev,users,idmap=user,IdentityFile=/home/my_name/.ssh/id_rsa,allow_other,reconnect 0 0
which is what arch wiki says to do (but doesn't explain very well).