Hello, You require 2 options.
1. user + vagrant insecure key 2. user + known password Documentation is here: https://docs.vagrantup.com/v2/vagrantfile/ssh_settings.html Option 1. in the Vagrantfile you need to add: config.ssh.username = user in the base box under this user you need to add the vagrant insecure key, which is what vagrant use to connect: Assuming the box is linux, these are the commands I use to add vagrant and to include the ssh key. Please modify to suit your box: "useradd vagrant", "cp /etc/sudoers /etc/sudoers.orig", "sed -i -e '/# %wheel\tALL=(ALL)\tNOPASSWD: ALL/a %vagrant\tALL=(ALL)\tNOPASSWD: ALL' /etc/sudoers", "mkdir ~vagrant/.ssh", "chmod 700 ~vagrant/.ssh", "echo 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key' > ~vagrant/.ssh/authorized_keys", "chmod 600 ~vagrant/.ssh/authorized_keys", "chown -R vagrant: ~vagrant/.ssh" Option 2. In the Vagrantfile add: config.ssh.username = user config.ssh.password = somepassword Let me know if you run into any issues. Alvaro On Mon, Jul 6, 2015 at 7:36 AM, Shash <[email protected]> wrote: > Hi All, > > I am new to this group and I have been trying out vagrant from past couple > of months. > > I would like to have a passwordless ssh to another user in the vagrant > guest. I tried a lot looking into various forums but in vain. > > Can someone explain me here how to get this done. > > Thanks! > Shash > > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in violation > of those guidelines may result in your removal from this mailing list. > > GitHub Issues: https://github.com/mitchellh/vagrant/issues > IRC: #vagrant on Freenode > --- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/vagrant-up/5686270f-c2c1-4c2e-b46c-08638177655d%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ewuB1ERb%2Bemt7bRLt_MENo-VUsr2-f%2BZEHwRkBF84g85w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
