Rather than ssh-ing onto my Vagrant virtual machine with a \"vagrant\" user-name and password, I\'d like to use kevin/kevin.
I modified my Vagrantfile t
Another solution, after adding user to Vagrant via your provisioning script:
## add kevin
useradd -m -s /bin/bash -U kevin -u 666 --groups wheel
cp -pr /home/vagrant/.ssh /home/kevin/
chown -R kevin:kevin /home/kevin
echo "%kevin ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/kevin
add this to your Vagrant file:
VAGRANT_COMMAND = ARGV[0]
if VAGRANT_COMMAND == "ssh"
config.ssh.username = 'kevin'
end
Now Vagrant will use default vagrant user to provision your VM, but once it's up, you can use simple vagrant ssh to log in as kevin via default Vagrant ssh-key.
This way you can ship your desired Vagrantfile and users just say vagrant up and kevin automatically becomes ready to use.