/etc/fstab ファイルで sshfs を使用してマウントする

/etc/fstab ファイルで sshfs を使用してマウントする

Ubuntuはfstabを使用してsshfsに接続しようとしましたが、ファイルはロードされません。

fstabで次のように入力しました。

[email protected]:/home/ssh2/SSHserver  /home/asir3/Escritorio/SSHclient  fuse.sshfs noauto,x systemd.automount,_netdev,user,idmap=user,follow_symlinks,identityfile=/home/ssh2/.ssh/id_rsa,allowother,default_permissions,uid=1001,gid=1001 0 0

その後、保存して次を作成します。mount -a

エラーは発生せずにフォルダにアクセスできますが、サーバーと同期しません。

サーバーには次のものがあります。

ssh2@Asir03:~$ tree SSHserver/
SSHserver/
├── ssh1
│   ├── 15.txt
│   ├── 1.txt
│   └── a
│       ├── 150.txt
│       └── 15.txt
├── ssh1.txt
├── ssh2
│   ├── pepa.txr
│   ├── pepa.txt
│   └── pepe.txt
├── ssh2.txt
└── ssh3
    ├── gema.txt
    ├── javi.txt
    ├── juan.txt
    └── marina.txt

4 directories, 13 files

ssh2@Asir03:~$ 

これが私がクライアント側から得るものです:

asir3@Asir03:~/Escritorio$ tree SSHclient/
SSHclient/
└── hola

1 directory, 0 files

asir3@Asir03:~/Escritorio$ 

フォルダ、ファイルなどを追加できますが、サーバーには保存されません。

ベストアンサー1

noauto「自動的にマウントしない」を意味するため、ファイルシステムは起動時または実行中にマウントされませんmount -a。ただし、一般ユーザーとしてマウントできます。

おすすめ記事