In this chapter, we're going to need a couple of virtual machines (VMs).
Feel free to use the Vagrantfile that follows. We're mostly going to work across the private network, between the VMs:
# -*- mode: ruby -*-
# vi: set ft=ruby :
$provisionScript = <<-SCRIPT
sed -i 's#PasswordAuthentication no#PasswordAuthentication yes#g' /etc/ssh/sshd_config
systemctl restart sshd
SCRIPT
Vagrant.configure("2") do |config|
config.vm.provision "shell",
inline: $provisionScript
config.vm.define "centos1" do |centos1|
centos1.vm.box = "centos/7"
centos1.vm.network "private_network", ip: "192.168.33.10"
centos1.vm.hostname = "centos1"
centos1.vm.box_version = "1804.02"
end
config.vm.define "centos2" do |centos2|
centos2.vm.box = "centos...