1

I would like to ask for help with the following problem. I want to mount folders on one server from two different servers with sshfs. Mounting works for both, but fstab auto mount only happens when sharing from one server, not the other. I use identity files for ssh.

Here are the sshfs mount scripts:

sshfs server1:/var/www /mnt/server1/var/www - works well!

sshfs server2:/var/www /mnt/server2/var/www - works well!

Here are the /etc/fstab scripts:

myuser@server1_IP:/var/www /mnt/server1/var/www fuse.sshfs delay_connect,defaults,idmap=user,IdentityFile=/home/myuser/.ssh/id_rsa,port=22022,uid=1000,gid=1000,allow_other 0 0 - WORKS WELL WITH SERVER1!

myuser@server2_IP:/var/www /mnt/server2/var/www fuse.sshfs delay_connect,defaults,idmap=user,IdentityFile=/home/myuser/.ssh/id_rsa,port=22022,uid=1000,gid=1000,allow_other 0 0 - BASICALLY THE SAME CODE, BUT DOESN'T WORK WITH SERVER2!

What could be the problem?

battila
  • 19
  • 2
  • Please re-read the guidance for the tags you've used. This is clearly a question about system configuration, not about __programming__, so is off-topic for Stack Overflow. It _might_ be suitable for [sf] or [unix.se]: consult the Help Centre for the site before you post. – Toby Speight Jul 31 '23 at 18:28

0 Answers0