I am uses a file to coordinate the ports so that I can remote into them with vagrant and do hostname configuration. ssh_port = open('../../provisioning/vagrant.ini').grep(/#{config.vm.hostname}/)[0].split(/[=\s]/)[4] config.vm.network :forwarded_port, guest: 22, host: ssh_port, id: "ssh"