I'm trying to set up an sshfs mount in fstab for persistent mounting of a network directory that has to be accessed via an ssh tunnel.
.ssh/config looks like this:
Host A Hostname outer.server User <user> IdentityFile /home/<user>/.ssh/id_rsa ForwardAgent yes Host B Hostname inner.server User <user> IdentityFile /home/<user>/.ssh/id_rsa ProxyCommand ssh -q A "nc %h %p" ForwardAgent yes
This works fine:
sshfs B:/home/<user>/ /mnt/B
In fstab this does not
sshfs#B:/home/<user>/ /mnt/B fuse.sshfs defaults,idmap=user,allow_other,reconnect,_netdev,users 0 0
mount -a is run after updating
fstab to put the changes into effect returns:
read: Connection reset by peer
I'd welcome any suggestions as to why the fstab version might not be working.