Re: Persistent sshfs mount from inside a Buster virtual machine?
hello nate.
i had a problem with setting this up in the first place and now it's working great for me. i have 4 vm's, debian: stable, testing, centos and opensuse. i think that suse was the worst to get it going.
here is mine from testing(bullseye/sid)
[Unit]
Description=sshfs_mount share
#Requires=network-online.target
#After=remote-fs.target
[Mount]
What=emetib@192.168.122.1:/home/emetib/programming/share/
Where=/home/chadb/share
Type=fuse.sshfs
Options=IdentityFile=/home/chadb/.ssh/id_rsa,allow_other,follow_symlinks,_netdev
and from my stable(8.11)
[Unit]
Description=sshfs_mount share
Requires=sshd.service
[Mount]
What=emetib@192.168.122.1:/home/emetib/programming/share/
Where=/home/chadb/share
Type=fuse.sshfs
Options=IdentityFile=/home/chadb/.ssh/id_rsa,allow_other,follow_symlinks,_netdev
[Install]
WantedBy=multi-user.target
why the testing doesn't complain about not having the [Install] i don't know.
i wrote this down so the next time it would be much much simpler.
for home-$USER-share.mount
need -- fuse, sshfs
mkdir /home/$USER/share
make sure that the $USER is correct in the mount point and where the id_rsa file is pointing to
chmod 644 the file once it gets put where it's supposed to go
-- /etc/systemd/system/
run sshfs as the $USER and sudo/root to make sure it is initialized
-- for opensuse; you will have to enable this with --
"systemctl enable home-$USER-share.mount" as sudo/root
journalctl -xe(?) is your friend on this. i don't know why i had to also use root (initalization), yet it kept messing with me if i didn't.
haven't posted for a while, so hopefully i helped
take care
em
Reply to: