にるぽっぽ

こんぴゅーたわかりません - 転職.com

よくわからないのでメモ

Vagrantを使っていて、コマンドプロンプトからvagrant upしていろいろ作業してMinGWからvagrant sshでリモートつなごうとしたら

$ vagrant ssh
VM must be running to open SSH connection. Run `vagrant up`
to start the virtual machine.

$ vagrant status
Current machine states:

nillpopopo           poweroff (virtualbox)

The VM is powered off. To restart the VM, simply run `vagrant up`

poweroff? コマンドプロンプトvagrant statusして状況確認

C:\nillpopopo>vagrant status
Current machine states:

nillpopopo           running (virtualbox)

The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.

起動はしてるっぽいけどMinGWからはだめっぽい コマンドプロンプトからvagrant sshしてみる

C:\nillpopopo>vagrant ssh
`ssh` executable not found in any directories in the %PATH% variable. Is an
SSH client installed? Try installing Cygwin, MinGW or Git, all of which
contain an SSH client. Or use your favorite SSH client with the following
authentication information shown below:

Host: 127.0.0.1
Port: 2222
Username: vagrant

入れそうだけどsshクライアントを入れてないのでエラー

なので、MinGWからvagrant upしてvagrant sshしてみる

$ vagrant up
省略

$ vagrant status
Current machine states:

nillpopopo           running (virtualbox)

The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.


$ vagrant ssh
Last login: Thu Jan  7 01:56:47 2016 from 10.0.2.2

無事に入れた