2つのホップでsshfs?

2つのホップでsshfs?

リモートの場所にあるフォルダをMacの/mnt/volumeにマウントしたいのですが、そのフォルダは通常ログインサーバーを介してアクセスされます。[Eメール保護]SSH(後続のホップに同じSSHキーを使用するため、-Aが必要です)などを使用して、このサーバーで一度実行します。このサーバーのホームディレクトリにあるフォルダを自分のMacにマウントしたいと思います。どうすればいいですか?ssh -A -Y -o [email protected]ssh -A -Y -o [email protected]

次のようにサーバーログインにフォルダをマウントできることを確認しました。したがって、私のsshfsは動作しています。sudo sshfs -o allow_other,defer_permissions,IdentityFile=~/.ssh/id_rsa [email protected]:/home/users/myname /mnt/volume

私はこの方法を試しましたhttps://www.larkinweb.co.uk/computing/mounting_file_systems_over_two_ssh_hops.html 当時はどこにいたのに戻ってきました。ssh -f [email protected] -L 2223:server-main.com:22 -Nsudo sshfs -p 2223 [email protected]:/ /mnt/volumeremote host has disconnected

ベストアンサー1

使用オプションssh_command:

sshfs :/mnt/volume -o ssh_command='ssh userB@systemB -t ssh userC@systemC'

削除:

fusermount -u /mnt/volume

おすすめ記事