Skip to content

Instantly share code, notes, and snippets.

@janbiasi
Created April 20, 2015 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janbiasi/4e0b3d526b190f9c95eb to your computer and use it in GitHub Desktop.
Save janbiasi/4e0b3d526b190f9c95eb to your computer and use it in GitHub Desktop.
#!/bin/bash
yum install -y openssh-clients man git vim wget curl ntp
chkconfig ntpd on && chkconfig sshd on
chkconfig iptables off && chkconfig ip6tables off
sed -i -e 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config
sed -i 's/^\(Defaults.*requiretty\)/#\1/' /etc/sudoers
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
mkdir /home/vagrant/.ssh && chmod 700 /home/vagrant/.ssh
curl https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub >> /home/vagrant/.ssh/authorized_keys
chmod 600 /home/vagrant/.ssh/authorized_keys
chown -R vagrant:vagrant /home/vagrant
shutdown -r now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment