CentOS Vagrantfile
Install Vagrant via brew
brew cask install virtualbox
brew cask install vagrant
brew cask install vagrant-manager
Generate separate ssh-key special for vagrant
ssh-keygen
save key to ~/.ssh/localvagrant_rsa
Append ssh host config to ~/.ssh/config
Host vagrant-centos 192.168.100.101
HostName 192.168.100.101
IdentityFile ~/.ssh/localvagrant_rsa
User vagrant
Vagrant machine will be available at 192.168.100.101.
In folder with Vagrantfile execute next commands:
To launch vagrant machine
vagrant up
To stop vagrant machine
vagrant halt
To remove vagrant machine
vagrant destroy
Execute command
ssh vagrant-centos
You can have next error after removing vagrant machine
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
Add correct host key in ~/.ssh/known_hosts to get rid of this message.
ECDSA host key for 192.168.100.101 has changed and you have requested strict checking.
Host key verification failed.
Just remove fingeprint for ip address 192.168.100.101 from ~/.ssh/known_hosts