Help us understand the problem. What is going on with this article?

Vagrantの中身をsshfsでマウントしようとしたらremote host has disconnectedされる

More than 1 year has passed since last update.

きっかけ

Railsでもやろうかと思ってVagrantで環境を作っていざsshfsでクライアントのMacのエディタを使って書くぞという気持ちになっていたらエラーが。

$ sshfs vagrant@192.168.33.10:/home/vagrant/app app

と打ったらエラーが出て悩む。
remote host has disconnected

これで解決!秘密鍵を指定する

$ sshfs -o IdentityFile=/Users/halka/Desktop/vagrant/centos7/.vagrant/machines/default/virtualbox/private_key vagrant@192.168.33.10:/home/vagrant/app app

秘密鍵のファイルのありか

秘密鍵はvagrant initしたディレクトリにあるので指定する。

$ sshfs -o IdentityFile=/path/to/vagrant/directory/.vagrant/machines/default/virtualbox/private_key

参考サイト

EC2をsshfsでマウントするには鍵ファイルは絶対パスで指定する - 総合的な学習のお時間

a_halka
羽田空港第2ターミナル50番台スポットから手荷物受け取りカウンターまでウォーキングの会主宰
https://cf6.in/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした