20
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

LAN内の他端末からvagrantの仮想マシンにsshする

Posted at

Vagrantfile

  • public_network を設定するだけでOK
config.vm.network :public_network
  • ブリッジするインターフェースを指定する場合
    • 指定がないとvagrant up時に聞かれる
config.vm.network :public_network, bridge: "en0: Wi-Fi (AirPort)"
  • IP指定する場合
    • DHCPなら指定しない(vagrant up後に確認する)
config.vm.network :public_network, ip: "192.168.0.110", bridge: "en0: Wi-Fi (AirPort)"

ssh

  • 別マシンからssh
$ ssh vagrant@192.168.0.110
vagrant@192.168.0.110`s password: (パスワードは vagrant )
20
21
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?