Pass an SSH command to a Vagrant machine
The vagrant ssh
command accepts an option (-c
or --command
) which allows you to pass in a single command to the virtual machine.
$ vagrant ssh --command 'sudo service apache restart'
The vagrant ssh
command accepts an option (-c
or --command
) which allows you to pass in a single command to the virtual machine.
$ vagrant ssh --command 'sudo service apache restart'