I am trying to SSH into a specific vagrant box from the command line:
vagrant ssh winbox password
'winbox' is what the box appears to be called in 'vagrant box list'. However, upon the entry of that command I get:
The machine with the name 'winbox' was not found configured for
this Vagrant environment.
If I just do 'vagrant ssh' It all works fine so I'm pretty sure I'm getting the box name wrong. The same box name appears in the vagrant file for the box:
Vagrant.configure("2") do |config|
config.vm.box = "winbox"
config.ssh.username = "vagrant"
config.ssh.password = ******
config.vm.network :forwarded_port, guest: 4444, host: 4440
config.vm.network :forwarded_port, guest: 5555, host: 5555
end
Is there any way to check the name of the currently running vagrant box?
It is important that I log into the box all in one line because I am basically using Java to execute command line code from within a JUNIT test and it's not possible to first go vagrant ssh and then enter a password with it.