I have a local network of linux machines plus one remote mail server. I have had an SSH password-less access to the remote server for years, but I'm trying to tidy up my local network and one of the items is a long-established niggle when rebooting the local machines.
I would like the remote access SSH (call it "myremote") to be automatically established when booting a local machine. To do this I want to add a line in fstab.
In a file manager (Thunar) I can simply type sftp://myremote and it's mounted.
In terminal I can use...
sshfs -p 1234 -o allow_other,IdentityFile=~/.ssh/id_rsa servername@123.123.123.123:/ /mnt/myremote
In fstab I cannot get it to work. Something like...
servername@123.123.123.123:/ /mnt/myremote fuse.sshfs sshfs_debug,debug,-p=1234,fsname=MyRemote,IdentityFile=/home/dave/.ssh/id_rsa,x-systemd.automount,users,allow_other,reconnect,_netdev 0 0
...returns, on sudo mount -a...
SSHFS version 3.7.0
executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-oPort==1234> <-oIdentityFile=/home/dave/.ssh/id_rsa> <-2> <servername@123.123.123.123> <-s> <sftp>
command-line line 0: Missing argument.
read: Connection reset by peer
I cannot discover which argument is missing, nor from where (mount or ssh).
Another aim was to use the long-established SSH config file and simply call it as myremote but that seems a long-shot.
Anyone have any ideas, please?