Last active
September 19, 2022 08:01
-
-
Save HalisCz/42752c7f9761946f2187fab63a386706 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.define "ubuntu" do |ubuntu| | |
ubuntu.vm.hostname = "ubuntu" | |
ubuntu.vm.box = "ubuntu/kinetic64" | |
ubuntu.vm.network "private_network", | |
ip: "192.168.56.14" | |
ubuntu.vm.synced_folder "./data-ubuntu", "/vagrant_data", create: true | |
ubuntu.vm.provision "shell", inline: <<-SHELL | |
apt-get update | |
SHELL | |
end | |
config.vm.define "rocky" do |rocky| | |
rocky.vm.hostname = "rocky" | |
# We are going to use unofficial image, because official one does not contain | |
# VirtualBox Guest Additions required to set network and synced folder | |
rocky.vm.box = "boxomatic/rocky-8" | |
rocky.vm.network "private_network", | |
ip: "192.168.56.15" | |
rocky.vm.synced_folder "./data-rocky", "/vagrant_data", create: true | |
rocky.vm.provision "shell", inline: <<-SHELL | |
yum -y update | |
SHELL | |
end | |
end |
Author
HalisCz
commented
Apr 4, 2019
•
vagrant ssh ubuntu
sudo su -
ssh-keygen
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_rsa.pub
exit
exit
vagrant ssh rocky
sudo su -
vi ~/.ssh/authorized_keys
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment