- Create default user as vagrant/vagrant in Ubuntu setup
- Add admin group
groupadd admin
useradd -a -G admin vagrant - update sudoers (sudo visudo; and add these lines
Defaults:vagrant !requiretty
Defaults env_keep = "SSH_AUTH_SOCK"
%admin ALL=(ALL:ALL) NOPASSWD: ALL - Add a port forwarding rule in Virtualbox NAT as follows:
Name: SSH
Protocol: TCP
Host IP:
Host Port: 2222
Guest IP:
Guest Port: 22 - Install and configure OpenSSH Server
sudo apt-get install -y openssh-server
sudo vi /etc/ssh/sshd_config
and add/modify these lines:
Port 22
PubKeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
PermitEmptyPasswords no
PasswordAuthentication no
restart ssh server - Download vargant public and private key
$ mkdir -p /home/vagrant/.ssh
$ chmod 0700 /home/vagrant/.ssh
$ wget --no-check-certificate \
https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub \
-O /home/vagrant/.ssh/authorized_keys
$ chmod 0600 /home/vagrant/.ssh/authorized_keys
$ wget --no-check-certificate \
https://raw.github.com/mitchellh/vagrant/master/keys/vagrant \
-O /home/vagrant/.ssh/id_rsa
$ chmod 0600 /home/vagrant/.ssh/id_rsa
$ chown -R vagrant /home/vagrant/.ssh - Remove file to fix network issues afterward
sudo rm -f /etc/udev/rules.d/70-persistent-net.rule - Comment out HWADDR row in /etc/sysconfig/network-scripts/ifcfg-eth1 (to fix https://github.com/mitchellh/vagrant/issues/1777 issue)
Tuesday, November 26, 2013
How to make Ubuntu Desktop Vagrant compliant
Its seems me reasonable to have Vagrant compliant Ubuntu Desktop 12.04 even I will not start it from commandline. These steps are necessary:
Labels:
Ubuntu,
VirtualBox
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment